UDP packet capturing in c#
Wireshark captures UDP packets in my LAN with follwoing details Source IP 192.168.1.2 Destination IP 233.x.x.x Source Port 24098 Destination Port 12074,12330 how can i capture it in c#? ...
Wireshark captures UDP packets in my LAN with follwoing details Source IP 192.168.1.2 Destination IP 233.x.x.x Source Port 24098 Destination Port 12074,12330 how can i capture it in c#? ...
Hi guys, My program consists of 2 parts - A server socket (sits on port 3490) running on a different thread, and a client to test the server. Now the server has a pdf file, and I want the client to display it in a UIWebView. To achieve this I used the folllowing: NSURLRequest *urlRequest = [NSURLRequest requestWithURL:[NSURL URLWit...
Hi My program (iphone app) consists of 2 parts - A server socket (sits on port 3490) running on a different thread, and a client to test the server. The server has a video file, and I want to send it to the client upon request. This I do like this: int fileDesc = open([viewController.filePath UTF8String], O_RDONLY); if (fi...
As a follow-up to cannot-bind-to-address-after-socket-program-crashes, I was receiving this error after my program was restarted: socket.error: [Errno 98] Address already in use In this particular case, instead of using a socket directly, the program is starting its own threaded TCP server: httpd = SocketServer.ThreadingTCPServer(...
Hi all, I am currently trying to connect an iPhone to a predetermined custom server. I have managed to make this connection using a simple easy to follow example I found in some forum. This code is as follows: - (void)sendcmd:(NSString*)cmd { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSString *hostname=...
Following is the code that I'm using for reading data over a .NET socket. This piece of code is run by a single separate thread. It works OK the first time, on the second iteration it stops at "client.Receive(buffer)" and never recovers from it. Initially I was using recursion to read data but changed it to iteration thinking that recurs...
(excuse me for my bad english)) I am writing a class for simple requests to FTP-server using .NET-class System.Net.Sockets.Socket.Synchronous functions (Socket.Connect, Socket.Send, Socket.Receive) works fine. But I need asynchronous operation to be able to interrupt the process from the outside. I used an example from MSDN: http://ms...
How can I get the IPv4 address of an interface in linux from C code ? e.g. I'd like to get the IP address(if any) assigned to eth0 ...
in an Erlang process, how could i receive from an ssl socket, and at the same time receive from another erlang process with the receive primitive? the idea is to forward what comes from the socket to another process; and backwards. my only option so far is to use some time receiving from each end, then switch. that, of course, will de...
I created a server with Perl under Windows (ActivePerl 5.10.1 build 1006) that forks upon being connected to, accepts some JSON data, and writes it to a database. I am running into a problem after 64 clients connect to the server, the error message being "Resource is not available" when trying to fork. Running this code under Linux I f...
I'm trying to allow multiple clients to connect to a host using select. Will I have to connect each one, tell them to move to a different port, and then reconnect on a new port? Or will select allow me to connect multiple clients to the same port? This is the client code: int rv; int sockfd, numbytes; if ((rv = getaddrinfo(hostN...
Why won't the following code work in C#? var c1 = new TcpClient(new IPEndPoint(IPAddress.Any, 8787)); var c2 = new TcpClient(new IPEndPoint(IPAddress.Any, 8788)); c1.Connect("localhost", 8788); I get a "connection cannot be made because the target machine actively refused it". So, the TcpClient constructor doesn't appear to be binding...
Hi, Could some please help me with these codes? I am trying to make client and server to communicate asynchronously. I mean both client and server don't wait for each other (e.g. when a server or client reads from recvfrom() and data are not present, it takes the last received one (what I named is backup). Here are the codes: client ...
How do I use crossdomain with ftp? I am trying to do a "hello world" level test of FTP in Flex, but for three days now, I cannot overcome the issue with how to coerce flex into accepting my crossdomain policy - even for testing purposes. Here is my code: The exact error text follows. <?xml version="1.0" encoding="utf-8"?> <mx:Applicat...
How is a file hosted on one particular port vs another port? In order to get my flex program to do anything, even on localhost, I apparently have to accomplish this, but although I know how to FTP my crossdomain.xml to my GoDaddy server, I don't even begin to understand the meaning of hosting it on port 843. I don't even know where to ...
Greetings all, I am trying to download 'gz' file using URL class .Code snippet is as: URL url = new URL("ftp://ftp.wwpdb.org/pub/pdb/data/structures/all/pdb/pdb132l.ent.gz"); InputStream conn = new GZIPInputStream(url.openStream()); But it throws the error: Exception in thread "main" java.net.UnknownHostException: ftp.wwpdb.o...
should I use http or proprietory socket? I need to transfer moderate amount of binary data between a desktop/mobile client and a server. ...
Hello all , I have question. I create socket , connect , send bytes , all is ok. and for receiving data i use recv function. char * TOReceive= new char[200]; recv(ConnectSocket, TOReceive , 200, 0); when there are some data it reads and retuns, succefull , and when no data waits for data, all i need to limit waiting time, for ex...
Hello all, I am building a java application that listens on 2 ports simultaneously and is also capable of multithreading. How Im doing this is as follows. I have a very basic GUI in PortApp.java which takes in 2 integers through 2 textfields and also has a listen button. So when the listen button is clicked, the following code is execut...
Hi guys I'm trying to run a simple server-client program on the iphone. The server and client are 2 different threads. Basically the server is supposed to send "hello world" to the client, and the client should print it. The server sends it like so: send(new_fd, "Hello, world!", 13, 0); The client receives it like that: if ((numbyte...