sockets

Creating Steam Event using Sockets

A while back I wrote a game plugin using sockets that automatically sent invites to a steam group using a game plugin. I am attempting to do the same thing except to create events from game instead of having to login to the steam panel. Here is what I got from Wireshark when creating the event... POST: http://teamras.net/post.png GET:...

Putting NSString into uint8_t buffer

I'm working with sockets and trying to simply write a string to the socket. I found a couple of examples on how to do this, such as the following example (oStream is an NSOutputStream). This is all within the NSStreamEventHasSpaceAvailable. uint8_t buffer[11] = "I send this"; int len; len = [oStream write:buffer maxLength:s...

Best way to resolve a DNS TXT record on Linux/Unix/Posix/BSD type systems?

I want to write some portable (as possible) C code to look up DNS TXT records. I would also prefer not to have dependencies on libraries that don't ship with the machine. What is the best way to do this on Unix-like machines using standard libraries? I found some sample code that works using libresolv, but it's not reentrant (not threa...

C89: getaddrinfo() on Windows?

I'm new to C89, and trying to do some socket programming: void get(char *url) { struct addrinfo *result; char *hostname; int error; hostname = getHostname(url); error = getaddrinfo(hostname, NULL, NULL, &result); } I am developing on Windows. Visual Studio complains that there is no such file if I use these incl...

Java Network / Socket programming tutorial

Hi everyone, I'm going to create a project in some month in a course I'm having and for that purpose I would like to read and try making some small test programs regarding the network / socket programming in Java. Ideally, what I'm looking for is a tutorial with description and a end program to create where I can between two computers ...

Sending a message through a particular client port

hi, I am doing projects in sockets.usually the server listens in a particular port,and the client has to connect to the port then the send and receives will happen.but we don't specify any port number in the client side,but i am in a situation to use a port in a client side, through this port only the messages will delivered to the ser...

Asynchronous socket programming

hello, i'm creating an Asynchronous socket programming in vb.net. i've utilised the code from Asynchronous client and server code frtom the following links: http://msdn.microsoft.com/en-us/library/fx6588te.aspx for server program The client program is present in the same link in /bew39x2a.aspx(sorry i'm a new user so could post only on...

bytesAvailable, readUTF() and ProgressEvent.SOCKET_DATA

Hello, I have multiplayer game, which reads XML data from the server: _socket = new Socket(); _socket.addEventListener(ProgressEvent.SOCKET_DATA, handleTcpData); ..... private function handleTcpData(event:Event):void { while (_socket.bytesAvailable) { var str:String = _socket.readUTF(); updateGUI(str); } } In most cas...

Socket Programming Failed in NAT Networks

I am doing projects using sockets,actually it runs in our environment without fail (LAN). When I try to run it in the client side which employs the NAT in their environment my program fails(i.e) unable to connect to the server through the client program I created. How to alter the program ? there is a Enum called SocketOption will it h...

The performance (or other) differences between raw Socket and UdpClient?

Hello All. As we know .Net has UdpClient for simple Socket usage for UDP. Blockquote From MSDN. If you are writing a relatively simple application and do not require maximum performance, consider using TcpClient, TcpListener, and UdpClient. These classes provide a simpler and more user-friendly interface to Socket communications....

nmap ports scan closes udp socket on windows open by ipworks v4

Upon receiving UDP packets from nmap (port scanner), UDP socket that were open by ivrworks (v4) is being closed without any notification. Has anyone encountered such a problem ...

Are there any good open-sourced comet web servers for ASP.NET MVC applications?

I'm looking for one that can be used to handle many long poll clients and does not create a thread for each request. ...

How do I change permissions to a socket?

I am trying to run a simple Python based web server given here. And I get the following error message: Traceback (most recent call last): File "webserver.py", line 63, in <module> main() File "webserver.py", line 55, in main server = HTTPServer(('', 80), MyHandler) File "/usr/lib/python2.5/SocketServer.py", line 330, in _...

boost::asio: thread local asynchronous events.

I will be creating x amount of threads in my server-app. x will be the amount of cores on the machine, and these threads will be (non-hyperthread) core-bound. Naturally with this scheme I would like to distribute incoming connections across the threads with the aim of ensuring that once a connection is assigned to a thread, it will only ...

Getting fast translation of string data transmitted via a socket into objects in Python

I currently have a Python application where newline-terminated ASCII strings are being transmitted to me via a TCP/IP socket. I have a high data rate of these strings and I need to parse them as quickly as possible. Currently, the strings are being transmitted as CSV and if the data rate is high enough, my Python application starts to ...

What are Async Sockets?

What are Async Sockets? How are they different from normal sockets (Blocking and Non-Blocking)? Any pointers in that direction or any links to tutorials will be helpful. Thanks. ...

Socket connection between end points on the same machine

When two end points of a socket connection reside on the same machine (Wintel, in this case), do messages between each other traverse onto the NIC card, network medium, and then back to the NIC/machine, and finally to to the other end point? The reason I am asking is that we've been getting some unexplained socket disconnections reporte...

Socket programming; shall I use pInvoke or write c# version of existing c++ app

Hello all, I have been assigned to a task where I need to connect to a socket and receive a lot of updates (3K-4K messages per second) I also need to send some message to server for authentication and configuration. There is an existing C++ apps given by the data provider and they have no c# sample. I have been trying to write this app...

What can be the reasons of connection refused errors?

Hello, I'm trying to write a server program in C, using another client, I get this error when I try to connect through port 2080 for example. connection refused What can be the reasons of this error? ...

C C++ - TCP Socket Class : Receive Problem

Hey, I did my own Socket class, to be able to send and receive HTTP requests. But I still got some problems. The following code (my receive function) is still buggy, and crashing sometimes. I tried debugging it, but it must be somewhere in the pointer arithmetics / memory management. int Socket::Recv(char *&vpszRecvd) { //vpszRecvd =...