Click here to Skip to main content
15,905,563 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I need to code a server and a client that communicates using tcp and an asynchronous communication. I wish to implement it with only the basic api's like createsocket(), listen(), connect(), bind() etc. CAsyncSocket is available but that's MFC and I am looking for basic help related windows api.....
Posted

CodeProject has any number of articles on this subject. There are client/server examples of any complexity.

Start here, although the author uses MFC for the application the socket stuff is pure win32.
Beginning Winsock Programming - Simple TCP client[^]
Beginning Winsock Programming - Simple TCP server[^]

This is a good article:
http://www.win32developer.com/tutorial/winsock/winsock_tutorial_6.shtm[^]

This may be of interest:
Event Based Socket Streams: SocketLib[^]
 
Share this answer
 
v5
Apart from the code from the links specified by pwasser, following basic information also may help you.

Getting Started with Winsock[^]


Creating a Socket for the Server[^]

Creating a Socket for the Client[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900