tcpip

How does serversocket class serve multiple client connections on same port?

Hi, When using a Socket class one is establishing a TCP connection to a server on some port, but on the server the ServerSocket is capable of handling multiple client connections for each accept request and delegate it to a thread to server the request. But how is it possible for a ServerSocket class to accept multiple tcp connections on...

Handshake with spoofed IP

I noticed some legit connection is like this: 6221 29.880628 5.4.3.2 1.2.3.4 TCP 61235 > cbt [SYN] Seq=0 Win=8192 Len=0 MSS=1452 SACK_PERM=1 6222 29.880646 1.2.3.4 5.4.3.2 TCP cbt > 61235 [SYN, ACK] Seq=0 Ack=1 Win=16384 Len=0 MSS=1460 SACK_PERM=1 6240 29.984383 5.4.3.2 1.2.3.4 TCP 61235 > cbt [ACK] Seq=1 Ack=1 Win=65340 Len=0 6241...

Transmission of float values over TCP/IP and data corruption

Hello all. I have an extremely strange bug. I have two applications that communicate over TCP/IP. Application A is the server, and application B is the client. Application A sends a bunch of float values to application B every 100 milliseconds. The bug is the following: sometimes some of the float values received by application B a...

TCP option SO_LINGER (zero) - when it's required

I think I understand the formal meaning of the option. In a legacy code I'm handling now, the option is used. The customer complains about RST as response to FIN from it's side on connection close from it's side. I don't sure I can remove it safely, since don't understand when it should be used. Can you please give an example when the ...

WinPcap and IP Change

Hi, im using WinPcap to listen to Ethernet-Traffic. The Ethernet-Packets contain a speciel Real-Time Protocol. Works great so far, but now I have to change the Ip Address of the adapter, on which pcap is listening. The moment I change the Ip winpcap doesn't stop working but don't capture all pakets. Pakets which are send from the loc...

Sample Code for Remote Process/Application Monitoring

All I am looking for a bit of inspiration here, a client has requested me to build a simple remote process monitoring application with capability for smtp notification, when monitored processes go down or come back on-line. Can anyone point me in the direction of some sample code to get me started. I have briefly looked at .net remot...

When send() returns in socket programming, what does that mean?

when send() returns, there are three possibilities: 1. the data to sent has been copied to the kernel buffer 2. the data to sent has been sent to peer 3. the data to sent has been sent to peer and received its ack Being really confused, I read some pieces of code about TCP/IP stack in Linux source, and I found the path of the data st...

Can a TCP checksum produce a false positive? If yes, how is this dealt with?

If a TCP payload gets corrupted in transit the recomputed checksum won't match the transmitted checksum. Great, all fine so far. If a TCP checksum gets corrupted in transit the recomputed checksum won't match the now corrupted checksum. Great, all fine so far. What happens when both the payload and checksum get corrupted and the recomp...

SQL Server Names are different with vpn then when logged into the server

I have a server with sql server 2005, 2008 and sql express. This is a dev machine. When I log onto the server I can get access to all servers as expected [SERVERNAME] = 2005 [SERVERNAME]\mssql2008 = 2008 When I connect to my vpn connection both sql management 2008 and redgate software see [SERVERNAME] as my 2008 server. When I try to...

Handling TCP Streams

Our server is seemingly packet based. It is an adaptation from an old serial based system. It has been added, modified, re-built, etc over the years. Since TCP is a stream protocol and not a packet protocol, sometimes the packets get broken up. The ServerSocket is designed in such a way that when the Client sends data, part of the data c...

WCF inner exception message "A registration already exists for URI 'net.tcp://....' " when trying to support a dual LAN from a WCF service

I have a self-hosted WCF service which is using the net.tcp protocol for an endpoint and it works fine on a PC with a normal LAN card. However, I want to support PCs which have dual LAN cards and this gives me problems. I have assigned different IP addresses to the two cards (192.168.1.1 and 193.168.1.1). I then changed my app.config fi...

multiple HTTP GET requests in one TCP/IP connection - processed parallel or sequential

hi, ok we get a lot of googlebot requests. googlebot requests up to 11 different files via 11 HTTP GET request, all in one single TCP/IP connection. are these GET request (all in the same TCP/IP connection) processed via the server in parallel or in sequence? Or is it up the the server? in this case, how does nginx handle thi...

Multiple messages in one BeginReceive

If a client sends multiple messages to a server over the same socket, will the EndReceive on the server side keep the messages seperated, or is it possible for the the server to receive partial messages from two seperate sends in a single BeginReceive? ...

Question about default route

Hi all: I learn this reference from MSDN.The pic below is a network topology which i am going to use. And quotation from the reference: Web Client: The Web client is connected to the 10.0.13.0/24 subnet and uses the IPv4 address of 10.0.13.110/24, the default gateway at 10.0.13.1, and the DNS server at 10.0.47.91. The We...

Keep Alive TCP/IP connected sockets over the Internet - when? how? and how much?

TCP/IP connections KeepAlives are specified to be at least once every two hours: http://tools.ietf.org/html/rfc1122#page-101. The problem is this was written in 1989 and is concerned about the cost of sending the extra KeepAlive packet! Yet it still is the default time most OS's in accordance with the spec send out KeepAlives down a conn...

Socket.Accept() causes a one second TCP/IP connect

When using CasiniDev fiddler shows a one second TCP-Connect for each connection from a browser. it's always exactly one second maybe few milliseconds up or down, that's why I think it might be a configuration somewhere. the thing that I can't make any sense out of is when I use System.Net.WebClient.DownloadString() in a loop without fi...

transfering data from 32-bit machine to 64-bit machine or vice versa

data is transfered over IP from a 32-bit machine to a 64-bit machine (or vice versa). Since the data will be transfered in network byte order there will be no problem during the transfer. Question: Will there be any problem when the data reaches the receiving end? What should be taken care of to avoid any problems, if there are any? ...

Apache - handling TCP connections, but not HTTP requests...

I have a GPS unit that can send data over a TCP connection, but I don't have the ability to modify the message that it sends so it would come to my server in the form of an HTTP request - it can only send a message in a predefined format. So, I have the following questions: 1) Is it possible to have Apache handle a TCP connection that...

Dynamically get "outgoing" IP address with PHP

PHP gives a different IP address for my site from $_SERVER['SERVER_ADDR'] than other sites see when I access them through cURL (or file_get_contents, or whatever). I know this because I had my site download whatismyip.com and it gives something different than that server variable. Adding to this annoyance is the fact that the outgoing ...

C# - Where to Test (MIB-II) object's website ?

Group, Do anyone know where I can test (MIB-II) objects for my TCP-Client. A ip-address or website. Thanks, Chad ...