Rahul
Rahul

Reputation:

Socket writing problem with TCP/IP

I am using TCP/IP socket example i.e. "echoclient", and I am facing problems with writing and reading.

I am connecting to server socket but it shows null data. I don't know whether it is data conversion problem or any other issue.

Upvotes: 1

Views: 500

Answers (3)

suprit chaudhary
suprit chaudhary

Reputation: 342

It is always a good idea to use well tested libraries and implementation. Socket programming is c++ requires good understanding of OS if you want to write potable code. Try Ace Wrappers - http://www.cs.wustl.edu/~schmidt/ACE.html It provide well tested pattern based C++ implementation for distributed network programming.

Upvotes: 0

Lou Franco
Lou Franco

Reputation: 89222

Download Wireshark and see if it helps debug. It can peek all network traffic.

Upvotes: 1

this. __curious_geek
this. __curious_geek

Reputation: 43217

In case if you are connecting via mobile, check with your GPRS/EDGE/3G service provider if they are not restricting arbitrary IPs ?

Also in case if you're connecting from Simulator on PC, check if you have Proxies over your network before internet ?

Upvotes: 0

Related Questions