Click to See Complete Forum and Search --> : Threads and winsocks
smallcoder
January 8th, 2003, 09:07 PM
in winsocks
yes i just want to know if is it possible to use the same socket
in 2 theards to handle your application reciving data and to send data: All of this with the same socket
so at the same time ofcourse
Steve_XP
January 9th, 2003, 01:11 AM
Of course you can use one socket for send and receive data!
DanM
January 9th, 2003, 02:30 AM
Look at:
http://tangentsoft.net/wskfaq/intermediate.html
section 3.9 - Is Winsock thread-safe?
Dan
roboguru
January 9th, 2003, 03:20 AM
make the Server socket accept and create a list of client socket.
And in your thread function call loop in list of client socket and look fo the desire client socket and start use it.
smallcoder
January 9th, 2003, 04:41 AM
it's not for the server. for the server i will create dynamicly a new soccet and a thread associated with it
but
it's for my client
i would like to have one thread to handle input and sending data and another to recieve and treat this data but all of this with the same socket.
codeguru.com
Copyright 2007 Jupitermedia Corporation All Rights Reserved.