client <-> server interaction in C

Gerard Beekmans gerard at linuxfromscratch.org
Tue Nov 22 09:48:00 PST 2005


Attached server.c and client.c. Compile with "gcc server.c -o server" 
and same for client. Run "server" followed by "client 127.0.0.1"

The part where you establish a connection between a client and server 
seems to be pretty easy. No error checking is done in this code of 
course, it's just to demonstrate it.

The next bit of code I'd like to test out would be the client sending a 
command to the server which the server will execute. That shouldn't be 
hard I don't think.



-- 
Gerard Beekmans

/* If Linux doesn't have the solution, you have the wrong problem */

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: client.c
URL: <http://lists.linuxfromscratch.org/pipermail/alfs-discuss/attachments/20051122/8f0384c6/attachment.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: server.c
URL: <http://lists.linuxfromscratch.org/pipermail/alfs-discuss/attachments/20051122/8f0384c6/attachment-0001.c>


More information about the alfs-discuss mailing list