Results 1 to 2 of 2

Thread: winsock api

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 1999
    Location
    Fremont, Ca, 94538
    Posts
    40

    Post

    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!!!!!!!

  2. #2
    Junior Member
    Join Date
    Dec 1999
    Posts
    22

    Post

    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
  •  



Click Here to Expand Forum to Full Width