What I have read so far, winPcap allows you to bypass OS and bypass application and transport layer processing for TCP and provides direct access to the link layer.
I am planning to use winpcap to do some user application stuff and not just sniffing. I will be receiving and sending critical information using pcap which I am currently do...
In TCP socket programming, if recv() returns 0, it is taken as an indication that the other side closed its connection. However, AFAIK, the TCP RFC does not mandate the payload of TCP to be > 0. So, theoretically, a TCP stack can receive a message with payload 0.
So, essentially my question is what will recv() returns if it receives a p...
Hi i am writing a socket client/server application in VB6.
i have the following code
Private Sub sockMain_ConnectionRequest(ByVal requestID As Long)
If sockMain.State <> sckClosed Then
sockMain.Close
End If
sockMain.Accept requestID
Debug.Print "Accepted connection from: " & sockMain.RemoteHostIP & vbCrLf
End...
Hi!
I've been trying to connect two Android devices (2.1) via TCP sockets.
The vital part of the code:
Server:
ServerSocket serverSocket = new ServerSocket(SERVERPORT);
Client:
Socket socket = new Socket(serverAddr, SERVERPORT);
The weird thing is I can make it work if the client is an emulator, but the same code fails if running bot...
Hi Folks,
Is it possible to specify a range of port numbers on the TcpChannel class rather than a fixed port or random port number.
We currently use a fixed port number for a remoting channel, but now because the application is being deployed in a citrix environment we need to use a range of port numbers to fit within their security en...
I'm writing a simple proxy (more a packet logger) for an online game in C#.
The basic Login process is like this:
Client->Server: Login Packet - My proxy receives the packet, displays it and sends it to the server.
Server->Client: Connected! Packet - My proxy again receives the packet, it also displays it again but when trying to send ...
How do I, without using third-party tools, craft TCP (and even UDP for that matter) packets in ANSI C? I want to be able to set all option flags, source ip address etc. So full control. Haven't found any good text about it online. Or I'm just using the wrong search criteria.
...
What does destination mac address field contains, when the source doesn't know address of remote machine ? (say opening page from google.com from my machine)
And while broadcasting the packet, what does mac-address field contains?
...
Hello, I was wondering if OCaml will perform well in terms of performance and ease of implementation while dealing with typical client/server interactions over TCP in a multi threaded environment.. I mean something really typical like having a thread per client that receives data, operated changes on game states and send them back to cli...
I have some code that seems to not handle it well when a TCP connection is closed via the RST flag instead of a normal handshake for closing the connection. The "connection reset by peer" situation. I'd like to write a TCP server that always closes via RST so that I can reproduce the bug and write some unit tests for this. So...
How do ...
I have a mobile application that needs to FTP an image over a wireless TCP/IP connection to a server. I have searched the internet for resources only to find that some of the popular ways to do this are not supported by the dot net compact framework (such as System.Runtime.Remoting). Is using TCP/IP a viable solution or is there another ...
I'm developing an application where, to satisfy the performance requirements, tuning of low-level network stuff (such as TCP window size etc) seems to be required.
I found the magnitude of my knowledge to be a bit better than "there's TCP and there's UDP", which is far from enough for this task.
What resources might I study to get a be...
I'm capturing http traffic with tcpdump and am interested in TCP slow start and how window sizes increase:
$ sudo tcpdump -i eth1 -w wget++.tcpdump tcp and port 80
When I view the dump file with Wireshark the progression of window sizes looks normal, i.e. 5840, 5888, 5888, 8576, 11264, etc...
But when I view the dump file via
$ tcpd...
I have made a simple server using TcpListener and it works great but now I would like the connection to be secure.
The clients that connect would be web servers so does it matter if the certificate is trusted or is that just for web browsers?
I have found muddled answers that are not straight forward!
UPDATED
Ok thanks so far pleas...
I have a requirement to open a tcp socket and authenticate using SSLv3 or TLSv1 IP protocol using X.509 digital certificate.
What does this handshake process involve exactly? I know the each message should be encrypted and signed with my private key. What else?
After successful I've to send POST HTTP requests over the socket.
The s...
I understand that the following code can (perhaps not very efficiently) find out a free TCP port in Java:
public static int findFreePort() {
int port;
try {
ServerSocket socket= new ServerSocket(0);
port = socket.getLocalPort();
socket.close();
} catch (Exception e) { port = -1; }
return port;
...
Hi,
This a basic doubt, but I wanted to know that if establish two TCP connections between the same two machines, will the packets in both the connection follow the same path(same link and nodes). The reason why I am asking this is because I want to measure the bandwidth between the two machines for both IPv4 and Ipv6 TCP connection and...
Time to learn TCP/UDP ... Anyways, my prof gave me this example and he said it worked for him. However when I go to compile I get a deprecated API error saying readLine is not in use anymore... :\
Code:
import java.io.*;
import java.net.*;
public class Server{
static Socket clientSocket = null;
static ServerSocket serverSoc...
Hi
I have a TCP server application which is listening for incoming connections. after establishing the connection and some send/receive operations i want to close the connection by the server. for the first time server successfully close the connection but the client cant make another connection, or it halts. but if I close the connectio...
I have a remote server which handles various different commands, one of which is an event fetching method.
The event fetch returns right away if there is 1 or more events listed in the queue ready for processing. If the event queue is empty, this method does not return until a timeout of a few seconds. This way I don't run into any HTTP...