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 ...
my question maybe obscure but its very important for me .
I have this perl code :
my $ua = LWP::UserAgent->new();
my $req = POST 'http://example.com',
[ phd => 'text' , go => 'submit'];
$content = $ua->request($req)->as_string;
print $content;
i want send the parameter (phd => text , go => submit) with a http proxy .
what am i goi...
Hi,
i need to write a socket server using perl which will run on a 64bit linux (2.6x kernel). Is there a library to support IO Completion Ports and some equivalent on Linux?
I need to listen to multiple ports. 8000-8100 is there a smart way doing this?
The protocol has to use a length byte.
What threading library do you recommend?...
I am coding sockets server for 1000 clients maxmimum, the server is about my game, i'm using non-blocking sockets and about 10 threads that receive data simultaneously from different sockets (first thread receives from 0-100,second from 101-200 and so on..)
but if thread 1 wants to send data to all 1000 clients and thread 2 also wants t...
Hello. I'm wondering if I can recv/send data on a raw socket before wrapping it - I've looked through the documentation and searched for it but couldn't find anything specific. What I basically want to do:
client, addr = listeningSocket.accept()
client.recv(32)
client.send(b'hello')
client.setblocking(0)
sslSocket = ssl.wrap_socket(clie...
We are in the middle to evaluate the technology choice to re-design an operator console application. The operator console as a hosted contact center has the abilities to queue the inactive calls, and hold, answer, transfer the active calls.
The legacy operator console used Java Swing. We want to use the latest RIA technology (Flex/Silv...
I'm experience with Java, but I have to integrate a java library into a co-workers python code. Enter jython, yay!
We are trying to send a UDP packet with a very specific data section.
We are building up the packet like so:
version = 0x0001
referenceNumber = 0x2323
bookID = byteArray('df82818293819dbafde818ef')
For easy of explanati...
The Simple TCP/IP client example will hang if no data is being received.
To see what I mean, copy the client code and run it, but remove one of the \r\n's in the GET request to make it invalid, so it looks like this:
$in = "HEAD / HTTP/1.1\r\n";
$in .= "Host: www.example.com\r\n";
$in .= "Connection: Close\r\n";
The server won't res...
I have a serious problem with the asynchronous Receive method of System.Net.Sockets.Socket.
Here is the code I use to open the connection:
_socket = new Socket(endpoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
_socket.Connect(endpoint);
byte[] buffer = new byte[1024];
_socket.BeginReceive(buffer, 0, buffer.Length, SocketFl...
Hi
I have started coding a packet injector and read up a bit on what one has to do. One thing I'm wondering though is when I create the IP header the h_source and h_dest fields should contain the mac address of the sender and receiver. Do I have to do this and is there a quick way to find out the mac address of the destination? Let's sa...
Hello
I am building an C++ application server-client where the client sends an image (170kb) to a server every 200ms.
Using UDP, the files uncompressed are over 64kbs allowed by each datagram (I'd like to avoid compressing the files if possible).
On the other hand I'm having problems setting a TCP connection, I managed stablish a conn...
Hi,
I have made a simple server running locally using tcplisten and it works fine over local network e.g. (127.0.0.11:8888).
But how do I now receive connections to the server from the internet, what ip and port do I set??
Thanks
...
I have a Perl server and when it boots up, it connects to 1000+ clients. It takes about 30-45 minutes to setup all the connections with SSL. I'm trying to decrease the start time to something more reasonable. I tried playing with threads to offload the work, but can't get it to work. Creating the socket in one thread and getting it back ...
I currently work on a multithreaded application where I receive data using the following (simplified) code:
private void BeginReceiveCallback(IAsyncResult ar)
{
bytesReceived = this.Socket.EndReceive(ar);
byte[] receivedData = new byte[bytesReceived];
Array.Copy(buffer, receivedData, bytesReceived);
long protocolLength = BitConverter.T...
I am running a Perl server with 10 threads. They never get destroyed until the program exits, but this is something I intend to have as much uptime as possible, so that's why this is an issue for me. The threads handle a simple task many times. When I start the server and all the threads are started, I see that I have 288.30 MB free. Aft...
Hi
I am creating UDP socket for a UDP client and sending UDP packets with different port numbers and wait for the reply from the destination for certain amount of time.
My doubt is .. Is it possible to re-bind a UDP socket to multiple port numbers(even IP-address) to the same socket FD without closing the socket ?? (I cant use RAW sock...
Hi, is there a Bible for Sockets programming in .NET that utilizes the 3.0 or later framework? An example of the caliber that I am looking for should be on the level of Concurrent Programming on Windows by Joe Duffy if this were a .NET threading and concurrency question.
C# is my prefered source code book samples but any language on th...
I'm awaiting the arrival of "Linux Network Programming" but in the meantime I thought I'd ask my brothers (and sisters) here for some info. If I have constructed a raw packet structure containing the ethernet header, ip header and tcp/udp/icmp header. What do I actually have to fill in when using the option IP_HDRINCL? At first I thought...
Hi,
due to my lack of english skills, I'm going to try to explain what I mean using a few examples:
socket() -> WSASocket()
connect() -> WSAConnect()
send() -> WSASend()
sendto() -> WSASendTo()
recv() -> WSARecv()
recvfrom() -> WSARecvFrom()
...
closesocket() -> WSA???()
This is nothing that matters much, still something that gives ...
Hi Everyone,
I've created a generic 'SocketServer' class in java which takes the following arguments:
String address, int port, Class socketProtocol, String encryptionType, int backlogSize
Basically, I want other developers to be able to instance this class in their projects and set some simple options for encryption, backlog, address,...