I'm writing code to send raw Ethernet frames between two Linux boxes. To test this I just want to get a simple client-send and server-receive.
I have the client correctly making packets (I can see them using a packet sniffer).
On the server side I initialize the socket like so:
fd = socket(PF_PACKET, SOCK_RAW, htons(MY_ETH_PROTOCOL));...
I have written some Python bindings for a third party library written in C++. When I use the library in Python it sends data over the network but it does not receive anything (it does both in C++). If I run the same test program in two different C++ processes it crashes because they are both trying to bind a socket to the same port.
Bu...
I am writing a multi-threaded .Net application in which many callers need to concurrently read from a single Socket.
Data read from the socket is split into records / chunks of data - each record is targetted at a specific caller identified by a CallerID in the header, so for example the stream of bytes read from the socket might be som...
First of all, this is a follow-up question to http://stackoverflow.com/questions/3325847/should-i-use-wcf-or-raw-sockets. Thanks to everyone who responded, it helped me a lot!
Lately, a few of my requirements changed. The main hurdle that came up is that I now have to support Linux clients in addition to Windows. I have to use .NET at s...
Hello.
I try to do a program which sending emails.
At the begining it works fine - I get 220(means "Hi"), then when I say "MAIL FROM:" it returns 250 (means OK) but then when I write "RCPT TO:" I get the 550 error and it writes
"Relaying not allowed".
why is google's smtp doesn't like it?
My code: http://pastebin.com/wNA1Zp26
*by the w...
Hi,
i am developing application which send and receive data between two computers but there is problem which i am facing when i send data the file size would be 4.56 kb but when i receive data on other side the file size reduce to 1.42 kb and data write in file also in complete my receiving byte size is 1024 * 5000.i am using c#.i am us...
Based from the answers I got from:
http://stackoverflow.com/questions/3366808/multiple-sockets-for-clients-to-connect-to
I've create this:
//Server
sock_init(); //from SFL, see http://legacy.imatix.com/html/sfl/
timeout = 50000;
serv_sock_input[0] = TCP(1234);
serv_sock_input[1] = UDP(9876);
input_protocol...
Hey everybody,
I have a server (debian lenny), spectral analyzer and I have downloaded collection of source codes from Steve Sharples's site. With these s. coudes I am able to connect to spectral analyzer - type command and get the responce.
For example:
my-atom:~/vxi11# ./vxi11_cmd 135.123.106.59
Input command or query ('q' to exit):...
I have written a simple Java application that interacts with multiple instances of itself using sockets. The first instance automatically takes on the role of the server, listening on a specific port, and all subsequent instances connect to it.
The problem I'm faced with is that Windows Firewall pops up asking me if I want to unblock th...
Is there any simple functions to check how much data is buffered but unread? FD_ISSET only indicates the presence of data in the buffer. Is possible not to create a second buffer in the program for greater control of buffer?
...
1.Client
procedure TForm1.ButtonKoneksiClick(Sender: TObject);
begin
if ClientSocket1.Active then
begin
ClientSocket1.Active := false;
end
else
begin
ClientSocket1.Address := EditIPServer.Text;
ClientSocket1.Port := StrToInt(EditPortServer.Text);
ClientSocket1.Active := true;
end;
end;
...
Hello Everyone, Is it possible to crawl user-authenticated websites using c#? Thnx
...
I am trying to create a inetd-like service for Windows in PHP for future use with my other application.
So all I can think of is to use Steam Server and proc_open to pipe the stream directly to the process (like inetd). Because on Windows there is no pcntl_fork(), and PHP doesn't support threading.
So far, here is my code. The inetdtes...
unable to bind address [0]: Only one usage of each socket address (protocol/network address/port) is normally permitted....
error is given by my php server page. I tried different port numbers as looking from cmd as writing netstat -an. Also I searched on google but no solution. I am using wamp server and working local .
Thanks .
<?ph...
Hi everyone.
I'v been searching google for a while to find some simple code to send data from server to the users browser (From PHP to AS3) but all of the codes out there are too complex and too advanced for what I need.
Here is what I need:
Lets say there are 50 users who have their browser open and waiting for the website admin to se...
I'm pretty new to web programming and I'm currently developing a web back end for a mobile application. Currently I have the users log in using servlet interactions and once they have full access to the application I need to open a Socket Connection so that I can provide server pushes. Now the problem I'm running into is how people handl...
Hello everyone. I am building a complex HTML 5 application that takes advantage of Websockets. I am getting to the point where I have a lot of different types of data that gets updated in real time on the screen.
I want to know if it is going to be better for me to have fewer Websockets that are more complex, or a lot of simple Websock...
when ever i run my program(outside the debugger/ide) i get error asynchronous socket error 10049, am i not supposed to recieve a message dialoge : ''error''? see my code below
begin
try
ClientSocket1.open;
except
showmessage('error');
end;
end;
what am i doing wrong?
...
Java newbie here. Are there any helper functions to serialize data in and out of byte arrays? I am writing a Java package that implements a network protocol. So I have to write some typical variables like a version (1byte), sequence Number (long) and binary data (bytes) in a loop. How do I do this in Java? Coming from C I am thinking of ...
It states in the MSDN documentation that:
at the very minimum, your state parameter must contain the connected or default Socket being used for communication. Since you will want to obtain the received data within your callback method, you should create a small class or structure to hold a read buffer, and any other useful informatio...