Hi
I'm not too sure how to go about getting the external IP address of the machine as a computer outside of a network would see it. My following IPAddress class only gets the local IP address of the machine.
Any help would be appreciated.
Thanks.
public class IPAddress {
private InetAddress thisIp;
private String thisIpAddress;
pr...
Hello
I want to use recv syscall with nonblocking flags MSG_NONBLOCK. But with this flag syscall can return before full request is satisfied. So,
can I add MSG_WAITALL flag? Will it be nonblocking?
or how should I rewrite blocking recv into the loop with nonblocking recv
...
Hello
Is there a tutorial for migration from plain udp sockets (linux, C99/C++, recv syscall is used) to the raw sockets?
According to http://aschauf.landshut.org/fh/linux/udp_vs_raw/ch03s04.html
raw socket is much faster than udp.
Application is client-server. client is proprietary and must use exactly same procotol as it was with u...
Hi, in spite of having so many efficient data structures, why is only linked list used
so heavily in systems programming? Is it because it allows least usage of heap/less buggy code?
Regards,
Pwn
...
Hi all,
my first question here, so please don't be to harsh if something went wrong :)
I'm currently a CS student (from Germany, if this info is of any use ;) ) and we got a, free selectable, programming assignment, which we have to write in a C++/CLI Windows Forms Application.
My team, two others and me, decided to go for a network-co...
A really strange one. We have a .NET application that connects to a server sends some information and then reads some information. The data I read has a fixed length header. The first part of the header is 1 byte. The problem is when doing the 1 byte read the network call blocks as if there is no data to be read. Now I know the data is o...
I created a threadpool and gave it 50 tasks to connect to a server. So once it was done connecting, sending some data over, then disconnecting. It also has a read timeout set at 5 seconds (5000 long of course). I even set the thread pool to a max size of 1. I then fire this up, on linux, and ran htop (a better version of top) to check th...
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...
I need to write a rate limiter, that will perform some stuff each time X bytes were transmitted.
The straightforward is to check the length of each transmitted packet, but I think it will be to slow for me.
Is there a way to use some kind of network event, that will be triggered by transmitted packets/bytes?
...
Hi, I have a simple form interface set up that send username and password information to a server: (working)
NSString *postData = [NSString stringWithFormat:@"user=%@&pass=%@",[self urlEncodeValue:sysUsername],[self urlEncodeValue:password]];
NSLog(@"Post data -> %@", postData);
///
NSData* postVariables = [postData dataUsingEncodin...
I'm currently working on a project which involves multiple clients connected to a server and waiting for data. I'm using select and monitoring the connection for incoming data. However, the client just continues to print nothing, acting as if select has discovered incoming data. Perhaps I'm attacking this wrong?
For the first piece of d...
When a client connects to a server using TCP, a new socket is created for the TCP stream. Does the connection remain on the same port the connection was made or does it get changed to some other port?
...
I'd like to experiment with writing my own little monitoring/firewall app.
...
Hi,
I get strange behavior from HttpClient with parameter CoreConnectionPNames.CONNECTION_TIMEOUT set to 1.
I would expect that HttpGet request would fail, throwing connection timeout exception and yet they are successful. This seems irrational as it actually means that TCP handshake finished in less then 1 millisecond.
The httpclient ...
Hello World!
I have developed a java servlet that monitors a folder on a network drive for new files then does some actions on them depending on what kind of file it is. It worked in Eclipse when Eclipse and Tomcat were running with each other, but now that I have deployed it onto a server(different machine), the servlet keeps logging t...
I'm working with an old WinForms app that uses WSE 3 to call a Java web service on a remote server.
The app performs a load test by running a number of requests on a configurable number of threads.
When running with one thread, 50 requests complete in 50 seconds and the time spent on each request is 1 second, plus or minus a small amou...
Hello.
I am trying to implement a transport layer protocol for my project. I am going to use Linux as my operating system. Could you please suggest me some books or links that explain the implementation of transport layer (like TCP)? Thank you..
Thanks,
Bala
...
I want to write a program that monitors packets in and packets out, or in other words, network statistics. Is there any useful class in cocoa? I know there are some existed tools, but it will be a sub-routine of my program. So I must implement on my own.
Thanks a lot!
P.S. I only want to calculate one program / process 's statistics r...
Having a Windows IOCP app............
I understand that for async i/o operation (on network) the buffer must remain valid for the duration of the send/read operation.
So for each connection I have one buffer for the reading.
For sending I use buffers to which I copy the data to be sent. When the sending operation completes I release th...
I am writing a script that grabs the external IP address along with some other information about each iface. I can't figure out how to make ruby send traffic over a specific iface(eth0 and wlan0 for example). I am currently using the open-uri library to open http://whatismyip.org and read it into a variable.
def get_external_ip
begin
...