Sponsored Content
Top Forums Programming Programming Sockets to Reconnect Post 302149925 by porter on Sunday 9th of December 2007 01:10:45 AM
Old 12-09-2007
Quote:
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.
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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: h@foorsa.biz
4 Replies

5. 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

6. 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

7. Shell Programming and Scripting

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

I want the text based Star Wars movie at towel.blinkenlights.nl 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

8. 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

9. 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

10. 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
multiplexer(n)					      One-to-many communication with sockets.					    multiplexer(n)

__________________________________________________________________________________________________________________________________________________

NAME
multiplexer - One-to-many communication with sockets. SYNOPSIS
package require Tcl 8.2 package require logger package require multiplexer ?0.2? ::multiplexer::create ${multiplexer_instance}::Init port ${multiplexer_instance}::Config key value ${multiplexer_instance}::AddFilter cmdprefix cmdprefix data chan clientaddress clientport ${multiplexer_instance}::AddAccessFilter cmdprefix cmdprefix chan clientaddress clientport ${multiplexer_instance}::AddExitFilter cmdprefix cmdprefix chan clientaddress clientport _________________________________________________________________ DESCRIPTION
The multiplexer package provides a generic system for one-to-many communication utilizing sockets. For example, think of a chat system where one user sends a message which is then broadcast to all the other connected users. It is possible to have different multiplexers running concurrently. ::multiplexer::create The create command creates a new multiplexer 'instance'. For example: set mp [::multiplexer::create] This instance can then be manipulated like so: ${mp}::Init 35100 ${multiplexer_instance}::Init port This starts the multiplexer listening on the specified port. ${multiplexer_instance}::Config key value Use Config to configure the multiplexer instance. Configuration options currently include: sendtoorigin A boolean flag. If true, the sender will receive a copy of the sent message. Defaults to false. debuglevel Sets the debug level to use for the multiplexer instance, according to those specified by the logger package (debug, info, notice, warn, error, critical). ${multiplexer_instance}::AddFilter cmdprefix Command to add a filter for data that passes through the multiplexer instance. The registered cmdprefix is called when data arrives at a multiplexer instance. If there is more than one filter command registered at the instance they will be called in the order of registristation, and each filter will get the result of the preceding filter as its argument. The first filter gets the incoming data as its argument. The result returned by the last filter is the data which will be broadcast to all clients of the multiplexer instance. The command prefix is called as cmdprefix data chan clientaddress clientport Takes the incoming data, modifies it, and returns that as its result. The last three arguments contain information about the client which sent the data to filter: The channel connecting us to the client, its ip-address, and its ip-port. ${multiplexer_instance}::AddAccessFilter cmdprefix Command to add an access filter. The registered cmdprefix is called when a new client socket tries to connect to the multixer instance. If there is more than one access filter command registered at the instance they will be called in the order of registris- tation. If any of the called commands returns -1 the access to the multiplexer instance is denied and the client channel is closed immediately. Any other result grants the client access to the multiplexer instance. The command prefix is called as cmdprefix chan clientaddress clientport The arguments contain information about the client which tries to connected to the instance: The channel connecting us to the client, its ip-address, and its ip-port. ${multiplexer_instance}::AddExitFilter cmdprefix Adds filter to be run when client socket generates an EOF condition. The registered cmdprefix is called when a client socket of the multixer signals EOF. If there is more than one exit filter command registered at the instance they will be called in the order of registristation. Errors thrown by an exit filter are ignored, but logged. Any result returned by an exit filter is ignored. The command prefix is called as cmdprefix chan clientaddress clientport The arguments contain information about the client which signaled the EOF: The channel connecting us to the client, its ip- address, and its ip-port. BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category multi- plexer of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. KEYWORDS
chat, multiplexer CATEGORY
Programming tools multiplexer 0.2 multiplexer(n)
All times are GMT -4. The time now is 05:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy