Tranfering unicod charcters in Socket programming!

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




Hi Friends,

In socket programming I want to connect double byte charcters.
Earlier we used recv() function for single byte charcter.
If we use double byte chracter in below recv function, its coming as a
question mark symbol.
If anybody knows how can I handle double byte charcter in Scoket
programing(recv function),Please let me know.


My codesnippet:

while( bytesRecv == SOCKET_ERROR ) {
bytesRecv = recv( ConnectSocket, recvbuf, 64, 0 );
if ( bytesRecv == 0 || bytesRecv == WSAECONNRESET || CheckTimeOut()) {
return CloseListen();
}
}

I am looking for sample example.

Note:Here recvbuf works for singel byte not for doublebyte charcters.


Thanks in advance.
.


Quantcast