Showing posts with label C. Show all posts
Showing posts with label C. Show all posts

Friday, July 1, 2011

How To Keep Alive TCP connection in case of GPRS

Requirement : POS terminal need permanent TCP connection with server on GPRS.
Problem : Connection break after some time(some minutes/ some hours)
Reason : May be Client/Server or Network Closing TCP connection due to inactivity of communication.
Solution : Send any message after every minute to server, So that it wont idle and wont disconnect.
Note: You can do some Hit and trial and check maximum time span to keep alive your TCP connection.
I think every network have different timeout(not sure).

Saturday, June 18, 2011

Client Server Programming

If you involve with client server programming at any level of programming and you didn't read "Beej's Guide to Network Programming" then you must read this document.
This is one of the simplest document available on internet for starting client server programming in C language.
I am using this document from last 5(approx.) year for all TCP/IP based communication module and UDP logger.

Author Page:- http://beej.us/

Beej's Guide to Network Programming :- http://beej.us/guide/
beej.us/guide/bgnet/output/print/bgnet_A4.pdf