tcp

Multiple Socket Connections

I need to write a server which accepts connections from multiple client machines, maintains track of connected clients and sends individual clients data as necessary. Sometimes, all clients may be contacted at once with the same message, other times, it may be one individual client or a group of clients. Since I need confirmation that t...

How can I forcibly close a TcpListener

I have a service which communicates through tcpListener. Problem is when the user restarts the service - an "Address already in use" exception is thrown, and the service cannot be started for a couple of minutes or so. Is there's any way of telling the system to terminate the old connection so I can open a new one? (I can't just use ran...

silverlight Socket: Unhandled Error in Silverlight Application An attempt was made to access a socket in a way forbidden by its access permissions.

I basically try to reproduce the Socket example from here: http://www.silverlightshow.net/items/Sockets-and-their-implementation-in-SL2-Beta-1-including-a-chat-like-example.aspx I only made a small change in the client side, i.e., String safeHost = "127.0.0.1"; int port = 4509; Then I got this permission error? Any idea w...

migrating Solaris to RH: network latency issue, tcp window size & other tcp parameters

Hello I have a client/server app (Java) that I'm migrating from Solaris to RH Linux. since I started running it in RH, I noticed some issues related to latency. I managed to isolate the problem that looks like this: client sends 5 messages (32 bytes each) in a row (same application timestamp) to the server. server echos messages. clie...

Troubleshooting occasional timeout of select() in windows

I'm having an occasional problem with select() timing out on me. I have it set for twenty seconds. The system will handle 100's of transactions correctly, but occasionally one fails with the selet timing out. It does about 1 transaction every few seconds, opening and closing the tcp conncetion with each transaction. I thought the ser...

Who's setting TCP window size down to 0, Indy or Windows?

We have an application server which have been observed sending headers with TCP window size 0 at times when the network had congestion (at a client's site). We would like to know if it is Indy or the underlying Windows layer that is responsible for adjusting the TCP window size down from the nominal 64K in adaptation to the available ...

Close an external TCP connection

How can i terminate a tcp connection wich is not handled by my program? for example i want to close all the connection on port 10202 and i dont want them to reopen but i want to allow the other ports everything in C# like Sysinternals' tcpView does ...

Problem with TCP server in Twisted

Hi all, I'm trying to make a simple TCP server using Twisted ,which can do some interaction between diffirent client connections.The main code is as below: #!/usr/bin/env python from twisted.internet import protocol, reactor from time import ctime #global variables PORT = 22334 connlist = {} #store all the connections ids = {} #...

Linux tool to send raw data to a TCP server

Hi, I am aware that this is not a direct 'development' question but I need that info to test a development project, so I think someone could've hit similar problem. I will test a software that runs a TCP server and according to sent commands replies some answers. I will test the software and do not want to write code if it doesn't work ...

[python] voice communication for python help!

Hello! I'm currently trying to write a voicechat program in python. All tips/trick is welcome to do this. So far I found pyAudio to be a wrapper of PortAudio. So I played around with that and got an input stream from my microphone to be played back to my speakers. Only RAW of course. But I can't send RAW-data over the netowrk (due the ...

Why reading my tcp inputstream lead a byte array fill in with null character only?

Hi everyone, I am not used to C# (I do C++ usually) and try to debug an application that is not mine, at all. My application tries to read a big line from a TCP socket. Let say around 140 000 characters. And it fails. Let me explain how. My code is here (inside a loop actually ) System.IO.Stream inputStream; ...

Reading from socket

I have data from socket, which is header and message. Header if of 5 bytes, 3rd and 4th is message length. I am reading from socket, can someone suggest me good function, it will return me msg. assuming that i am reading 1024 bytes and it may happen that i have recived only partial data. ...

How to handle asynchronous socket receiving in C++?

I'm currently using a thread to handle Connect and Send calls asynchronously. This is all working fine, but now I want to make receiving asynchronous too. How should I receive data without pausing the whole queue while waiting for data? The only solution I can think of right now is a second thread. ...

I want to establish a TCP/IP connection over a UART connection (Windows XP/7)

I want to connect two computer via serial but for each to see each other via a TCP/IP connection. Ie, create new network device on the computers that are in actual fact serial ports. The reason for this is that I am actually testing the medium in which the serial connection is made (wireless), and part of the experiment will be to use T...

How many bits can be transfered through Ethernet at each time?

I am writing a networking application. It has some unxpected lags. I need to calculate some figures but I cant find an information - how many bits can be transferes through Ethernet connection at each tick. I know that the resulting transfer rate is 100Mbps/1Gbps. But ethernet should use hardware ticks to sync both ends I suppose. So it...

Coonecting to a TCP server from a Web Server

Hi, Is there a way that I can connect to a TCP server using a Web Server (for an example, connect to a TCP server through a php page)...??? Any resource to read on this??? Thank You!! ...

SQL Server: error when connecting

The application I'm using tries to connect SQL Server named instance running on a dedicated database server. Here's the error I'm getting: The TCP/IP connection to the host <instance_name>, port 1433 has failed. Error: Connection refused: connect. Is the firewall blocking my access or what? Should I dedicate a different port for this...

Is there an equivalent to TCP_KEEPIDLE, TCP_KEEPCNT, and TCP_KEEPINTVL under MacOS/X?

Hi all, I've got a server that runs under MacOS/X and Linux. Under Linux, I've found the following code to be useful in specifying a TCP socket's behavior in the case where a client gets suddenly disconnected from the network: int arg = 5; // send a keepalive packet after 5 seconds of inactivity if (setsockopt(fd, SOL_TCP, TCP_KEEPI...

How do I handle partial write completions from overlapped I/O using I/O Completion Ports

On Windows I/O completion ports, say I do this: void function() { WSASend("1111"); // A WSASend("2222"); // B WSASend("3333"); // C } If I got a "write-complete" that says 3 bytes of WSASend() A were sent, is it possible that right after that I'll get a "write-complete" that tells me that some or all of B & C were sent, or...

Can Microchip TCP/IP stack implements two or more clients sockets at the same time?

I need to make one device communicate with 2 servers. Is it possible with Microchip TCP/IP stack? ...