networking

getpeername() doesn't work with connections to localhost

EDIT: Restating the problem, if I am listening to port 54321 and a local process listening to port 12345 connects to me, creating socket s, how do I actually find the port it is listening on? sockaddr_in addr; int len = sizeof(addr); getpeername(s, (sockaddr*)&addr, &len); cout << string(inet_ntoa(addr.sin_addr)) << ":" << ntohs(addr.si...

Sending int through socket in Java

What is the best possible way to send an int through a socket in Java? Right now I'm looking at sockout.write((byte)( length >> 24 )); sockout.write((byte)( (length << 8) >> 24 )); sockout.write((byte)( (length << 16) >> 24 )); sockout.write((byte)( (length << 24) >> 24 )); and then trying to rebuild the int from bytes on the other s...

What is csq field in packet ????

What is csq value of network in network packet ...

How to remove or change port number once allocated

I have .exe file which only run the application(not a setup) of 1 mb...if i run it on windowes 2003 server it normally ask for port number...i hvae allocated a port ,now it is giving an arreor (;6overflow)...application is buit in vb6. to solve this problem i want o give a try by changing port no...how can i remove/change port no once a...

Good tools to understand / reverse engineer a top layer network protocol

Hi Guys, There is an interesting problem at hand. I have a role-playing MMOG running through a client application (not a browser) which sends the actions of my player to a server which keeps all the players in sync by sending packets back. Now, the game uses a top layer protocol over TCP/IP to send the data. However, wireshark does not...

How to detect available APN settings?

Hi, I need to access somehow APN settings in my BlackBerry application. My app is running on JDE 4.2.1. Any help? ...

Multicast Send Performance

We recently completed an analysis of multicast sending performance. Happily, Java and C performed almost identically as we tested different traffic sending rates on Windows and Solaris. However, we noticed that the time to send a multicast message increases as the time between sends increases. The more frequently we call send, the le...

how to differentiate if client is using TCP or UDP from server side

I am writing simple client-server program. Client send some messages to server using UDP or TCP. Server must be able to support both UDP and TCP. If client, sends message using UDP, sequence of method calls in client is socket(),bind(),sendto(),recvfrom(),close() and that in server is socket(),bind(),sendto(),recvfrom(),close(). If it...

Concurrent network client in Cocoa

I'm trying to work out in my head the best way to structure a Cocoa app that's essentially a concurrent download manager. There's a server the app talks to, the user makes a big list of things to pull down, and the app processes that list. (It's not using HTTP or FTP, so I can't use the URL-loading system; I'll be talking across socket c...

Getting An IP Address in a CSLA remote data portal

I'm writing an app in CSLA and want to log IP addresses, but only if the client is calling a remote data portal (such as the WCF one). How can I get the client's IP address when executing within a remote data portal? I realize I could probably pass it with the request, but I'd like to avoid this if possible. ...

how to connect and sends data betweens many computers using Java networking

Hi, I am beginner of learning Java Networking.I want to connect 3 or more computers. One for server and others(eg A and B )for clients .But I want to connect A to Server and vise versa B to Server and vise versa A to B and vise versa First I want to send message from either A or B to server and server sends stored data to send...

Sharing my Paint Brush Application over a network

I have made a very basic paint brush application in java. I want to enhance this application to be shared across users on the internet so that we can simultaneously share the instance and work collaboratively on the paint screen. [i got this idea form the doodle work env in yahoo messenger] I am not sure if this would be acheived by ne...

Advantages of knowing for a client, how big the package sended by the server is

I'm really new at network-programming, so I hope this isn't a complete Newbie-question. I read a tutorial at the Qt-Homepage how to build a little server, and I found this: QByteArray block; QDataStream out(&block, QIODevice::WriteOnly); out << (quint16)0; out << "..."; // just some text out.device()->seek(0); out << (quint16)(block.s...

How do I view the TCP Send and Receive Queue sizes on Windows?

Linux netstat shows send and receive queue sizes. How do I get this info under Windows, specifically Server 2003? ...

Java: How to convert MySQL DECIMAL(39,0) IP address to String

So I'm told that the DBAs here are going to be storing IP addresses in a DECIMAL(39,0) field in our MySQL database. How can I go about translating that into a String to pass on to our other applications? Note: Our databases can't take any more load, so as much of the work as possible needs to be done in the Java application. Note2: IP...

How to analyze/intercept packets before they are sent/received by the OS?

I have always wondered how software firewalls work under the covers, and would like to be able to write my own custom tools to analyze or intercept packets before they are sent or received by the OS. I'm fairly acquainted with core networking principles; I just have no clue where to start if I want to write software that fits inside the ...

10 gig ethernet in Java?

Does Java 6 support 10 gig ethernet out of the box? It seems like it shouldn't require Java changes, but I thought I remembered that Java 7 was adding 10 gig support. ...

is it possible to debug 2 clients of a remote (remoting) server on the same pc?

hi i want to test my application which involves one server and a few clients. it is necessary that 2 clients at least will be connected to the server in order to test it's functionality. i succeeded to run one client and the server on the same machine and debug it. is it possible to run 2 clients at the same times? the problem is that th...

Send udp packet on LAN from web browser

I have built a simple TAPI app that will run on a machine on the LAN that connects to the office PBX, it allows me to receive dial, answer, hangup etc commands (which I was planning on receiving via a udp packet). I did this with the intention to integrate the office CRM system to the phone system. Having done this and testing using a s...

BlackBerry - How to make socket keep alive for infinite time

Hi I have created socket program in Blackberry. and also set socket to keep alive using the following socket = (SocketConnection) Connector.open(URL); socket.setSocketOption(socket.KEEPALIVE, 2); But my socket connection gets terminated after 2-3 minute. Means if I keep Ideal for 2-3 minute for 2-3 minute then m...