Programming Sockets to Reconnect

Thread Tools Search this Thread
Top Forums Programming Programming Sockets to Reconnect
# 1  
Old 12-07-2007
Programming Sockets to Reconnect

Hello everyone,

I'm very interested in sockets programming
for developing games.

Right now i'm trying to develop a client,
and connecting to a host and port can be done,
but i googled lots of pages,
but i could not find how to reconnect
to the host/port if the connection is somehow

Is there a way to do that?
Pardon me if i sound new, i am new...
# 2  
Old 12-08-2007
that depends on what protocol you use, for one thing. i guess tcp/ip. so if you have a connection loss, ie pull cable and put back in, the connection will remain as long as you dont quit it or some system specific timeout applies. if you want a "soft" reconnect, meaning the connection was lost, and a client directly starts a new connection, you have to have some way to identify that new connection as the clients one, and replace the clients old stale connection with the new one.
# 3  
Old 12-09-2007
Originally Posted by raistie
but i could not find how to reconnect
to the host/port if the connection is somehow broken.
The idea with TCP/IP is that you don't. Once the stream is broken it is dead, no more. A new stream/connection needs to be made.

UDP/IP does not uses connections and is often used for games.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

How do I keep an X session alive when my VPN/ssh disconnects so I can reconnect later?

Hi, Sorry if this question has been asked before, however, I have tried looking in the forum (and google in general) and I haven't found an answer, so I thought I'd ask here. I am trying to use a GUI application in Solaris 10. Normally I connect with a VPN then SSH and use Xming to... (2 Replies)
Discussion started by: John_sp
2 Replies

2. AIX

AIX help -reconnect EMC lun

we have an old AIX system with important data on an EMC LUN. the AIX server crashed and we had to rebuild it with the old AIX os 5.8. how do we reconnect the EMC LUN without losing the data? (15 Replies)
Discussion started by: jhudson12
15 Replies

3. UNIX for Dummies Questions & Answers

From iOS programming to Linux system programming

Hello. I like Linux and C programming language. Allways wanted to understand kernel and become a Linux system programmer. And I also like Objective-C and iOS. These two programming areas have relations: 1. Linux and iOS are UNIX-like systems, POSIX compliant. 2. It is useful to know C language... (2 Replies)
Discussion started by: Rockatansky
2 Replies

4. Shell Programming and Scripting

how do I infinite loop (reconnect) to auto disconnect telnet server

I want the text based Star Wars movie at to loop infinitely. It plays the movie and then disconnects my session? Can anyone think of a way to make my unix machine automatically reconnect over and over? EDIT no commands are required are the connection its just in and... (3 Replies)
Discussion started by: herot
3 Replies

5. Emergency UNIX and Linux Support

Wireless outof range won't reconnect

I'm trying to make my ubuntu reconnect to my wireless network when it's in range. All the network settings are static. essid doesn't change however when I get back in range without: "iwconfig wlan0 essid tandem" the connection won't be re-established. is there anyway to fix it? Just... (1 Reply)
Discussion started by: moshe88
1 Replies

6. IP Networking

Raw Sockets Programming

Hi everybody!! I'm studding at the university raw sockets, but i can't find a good place to read about them... Does anybody now where i can find some information??? I've been goggling a lot but couldn't find nothing useful, just man pages... by the way, I'm programming under Linux... Bye! (4 Replies)
Discussion started by: Sandia_man
4 Replies

7. Solaris

How to reconnect to a disconnected remote ssh session

hi all How to reconnect to a disconnected remote ssh session on solaris 10 is there any way (4 Replies)
Discussion started by:
4 Replies

8. Shell Programming and Scripting

Reconnect and download data from online site

Hi, I have to connect to online site and download some data from the online site but sometimes the site which i have to connect will be busy or it will not be working in such a case i have to connect atleast 3 times and try to download the data. I tried like this: use CGI::Carp... (2 Replies)
Discussion started by: vanitham
2 Replies

9. UNIX for Dummies Questions & Answers

Carreer:Networking Programming in Unix (C programming Language)

Hello, I am trying to learn Networking Programming in C in unix enviorment. I want to know how good it is to become a network programmer. i am crazy about Network programming but i also want to opt for the best carreer options. Anybody experienced Network Programmer, please tell me is my... (5 Replies)
Discussion started by: vibhory2j
5 Replies

10. Programming

How to reconnect to online database?

HI, I am using perl LWP for connecting to online databases. some times i will get connection fail. I want to keep track of that error and again i want to connect. i.e when i get connection fail the program should not stop it should try to connect. I can check connection fail has... (1 Reply)
Discussion started by: vanitham
1 Replies
Login or Register to Ask a Question

Featured Tech Videos