MFC Socket
-
Hi, I am working on MFC Asynchronoussocket program, I could able to successfully send and receive messages between one to one client and server using accept, receive classes. But when i am trying to connect multiple client to server, my application crashes. And I also wonder, if I able to accept multiple client, how would I match the send and receive messages between different clients and server. Could anyone please help me out!!! Thanks Reddy
-
Hi, I am working on MFC Asynchronoussocket program, I could able to successfully send and receive messages between one to one client and server using accept, receive classes. But when i am trying to connect multiple client to server, my application crashes. And I also wonder, if I able to accept multiple client, how would I match the send and receive messages between different clients and server. Could anyone please help me out!!! Thanks Reddy
reddy07 wrote:
And I also wonder, if I able to accept multiple client, how would I match the send and receive messages between different clients and server.
I've only looked at the basics of this quite some time ago, but the structure that
accept()
populates on the server has asin_addr
member. Can you pass that toinet_ntoa()
?"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
reddy07 wrote:
And I also wonder, if I able to accept multiple client, how would I match the send and receive messages between different clients and server.
I've only looked at the basics of this quite some time ago, but the structure that
accept()
populates on the server has asin_addr
member. Can you pass that toinet_ntoa()
?"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
Thanks david, I solved it - now I could able to establish mulitple client with single server, but I am facing problem in receving messages from clients. Server couldnt receive the message that client is sending. On client side, client is sucessfully sending the message. Could you please throw some light. Binding i will look into it later once server start receving messages