Click to See Complete Forum and Search --> : Socket Error


Vinod S
June 21st, 2004, 09:34 AM
Hi all

i am creating a chat program which supports voice and video. i am stucked now. i am using CSocket class for the connections. my voice communication got problem. i have created a separate thread to record and play voice. i will send the voice buffer to the server. where the server will redirect the voice buffer to curesponding client.

here is my problem. i have used CArchive for the data transfer. but i found the server is hanging with in minuts after the soud chat is ennabled. for the sound is a continuies stream i am sending a buffer of size 8000 chars twice per second. so my server getting hanged unable to handle this packets.

then i used sockets Send function for the communication. it worked in lan but when i moved to internet it floped. its showing error just after some seconds

can anybody give me a remedy for this. my real problem is to transfer voice data buffer through internet. i am stucked here. hope to get a reply soon from this forum

Andreas Masur
June 21st, 2004, 10:07 AM
[Moved thread]

kuphryn
June 21st, 2004, 12:57 PM
First off, why did you choose CSocket and serialization? For control, I highly recommend raw winsock and simple data in bytes.

Kuphryn

Vinod S
June 22nd, 2004, 12:49 AM
will it work with continous voice packets through internet?Is there any other option for voice over IP?

Mathew Joy
June 22nd, 2004, 02:11 AM
Using CSocket for data streaming is really a bad option, because of its inefficiency, poor performance and bugs. You should move to using winsock APIs...depening on the no of connections the server has to handle you can use simple blocking io (basic send/recv) or high end IOCP.

There is a relatively new technology QoS, that can be used with sockets, which is specifically meant for situations such as yours. More info can be found in MSDN (http://msdn.microsoft.com/library/en-us/qos/qos/qos_start_page.asp).

Vinod S
June 22nd, 2004, 04:52 AM
Can u give me a sample code for using the Socket API s

Mathew Joy
June 22nd, 2004, 05:01 AM
WsFaq (http://tangentsoft.net/wskfaq/) is a good winsock faq and tutorial site. You can find sample codes as well.

:thumb:

Vinod S
June 22nd, 2004, 05:06 AM
Helo Mathew i am also frm kerala Tvm, Can i get ur mail id or contact number so that i can communicate with u directly. i am insearch for a contact here. ofcourse i may be a annoyance for u also i think u will be a help for me.

Mathew Joy
June 22nd, 2004, 05:15 AM
No problem in helping you. But I prefer you posting your questions here in this forum. You'll get better solutions when more people look into your problem. Moreover the solutions provided here will benifit others who search for answers in this forum.

:thumb:

Vinod S
June 22nd, 2004, 05:28 AM
Actualt i was looking for a personal contact if u nerver mind.

hongky
July 7th, 2004, 05:06 AM
me too