Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all. I have problem. I want to transfer images using TCP/IP socket programming in VC++ 2010. Unfortunately my reciever code recieve only first frame/image, but sender side continue send the images. In my reciever side first time only accept() and recv() function working properly, but after first iteration control stop in the line accept() function. But that time sender continue send the images taken from webcam. I have heard that this time probabli asynchronous transfer is necesaary. But unfortunately I am unable to do that. Please give me solution.

Thanking you.
Posted

1 solution

Hi,

You can do the following:

Enter a loop in which we:
1. Call accept() to wait for an incoming connection
2. Service the request on our new connection
3. close() our connection, and continue the loop to wait for a new one


This article would help you understand the TCP/IP mechanism Beginning Winsock Programming - Simple TCP server[^]
 
Share this answer
 

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