|
-
Dec 31st, 1999, 02:54 PM
#1
Thread Starter
Member
hi, i've managed to connect and send data with winsock.dll functions. Then i ran into a few problems... I am making a very simple *****peer chat. My server listen on certain port and client connect to that port. Now, I am trying to send data back and forth, but then I wonder. Should I keep that socket alive and transfer with that socket(if it's possible), or create new socket everytime I press send? And also, for my server, I tried to use a timer with recv() to see if I got data, then it froze. Are there any other ways to notice the incomming data from client?? Please help me out!!!!!!!
-
Dec 31st, 1999, 10:20 PM
#2
Junior Member
It is possible to send and receive data with the same socket. It is also possible to notice incoming data from the client. Since you topic is "winsock api" I am assuming you are not using the winsock control. To see if you are receiving data you must make the socket listen on thay port, and read data on the event of data being received. I wrote a tutorial earlier on this if you are interested, it is located at http://codeseek.selfhost.com/tutoria...sockapi1.shtml
-B4
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|