I have written a C# server application which uses Deusty.net AsyncSockets (great project by the way!) and I'm running into a very strange problem.
All the events are being processed correctly including DidRead, giving me a valid sender (IP address etc) but when it comes to disconnections, I get a strange situation where the socket data ...
Take for example:
fsockopen(tcp:\\example.com, 80, $errno, $errstr, 5)
My friend has just informed me that PHP will always wait for the TCP handshake to be completed before closing the socket. However, I find it difficult to believe that PHP can't interrupt the handshake.
Is it possible? If so, how?
...
Hi all;
Im writing a concurrent server that's supposed to have a communication channel and a data channel.
The client initially connect to the communication channel to authenticate, upon successful authentication, the client is then connected to the data channel to access data.
My program is already doing that, and im using threads.My ...
Hi All,
Question 1
From SUSE man pages, I get the below details for socket connect options
If the initiating socket is connection-mode, then connect() shall attempt to establish a connection to the address specified by the address argument. If the connection cannot be established immediately and O_NONBLOCK is not set for the fil...
Hi,
I am using a Socket (not xmlSocket) connection between flex applications and the server pushing messages.
Now, when I connect from the local machine to the server everything is working file and running, connection is succesful and I get data back and forth.
When I upload the application (flex) to the server and run it from there, ...
New to AS3 and I get this error: 1084: Syntax error: expecting rightbrace before colon. Conn:Socket: null,
var mc:Object = {
Conn:Socket: null,
Username:String: "fu",
};
function zSock(host:String = "70.32.72.134", port:String "70.32.72.134"):void {
mc.Conn = new Socket(host, port);
mc.Conn.addEventListener(Event.CONNEC...
After reinstalling service wrote in python on the virtual machine with gentoo i get strange situation with open new sockets in scripts.
Python wait(up to 1 minute) to start opening sockets for tcp connections, and this cause tcp timeouts on above servers.
Grateful for help)
...
While working on a WebSocket server in Java I came across this strange bug. I've reduced it down to two small java files, one is the server, the other is the client. The client simply sends 0x00, the string Hello and then 0xFF (per the WebSocket specification).
On my windows machine, the server prints the following:
Listening
byte: 0...
I am writing a Client/Server set of programs
Depending on the operation requested by the client, I use make TCP or UDP request.
Implementing the client side is straight-forward, since I can easily open connection with any protocol and send the request to the server-side.
On the servers-side, on the other hand, I would like to listen b...
I'm having some problems reusing a server socket in a test application I've made. Basically, I have a program that implements both the client side and the server side. I run two instances of this program for testing purposes, one instance starts to host and the other connects. This is the listening code:
private void Listen_Click(object...
I am new to Socket programming in Java and was trying to understand if the below code is not a wrong thing to do. My question is:
Can I have multiple clients on each thread trying to connect to a server instance in the same program and expect the server to read and write data with isolation between clients"
public class Client extends ...
I'm trying to stop a TCP Listener as my program is exiting. I do not care about any data that is currently active on the socket or any of the active client sockets.
The socket clean up code is essentially:
try
{
myServer.Server.Shutdown(SocketShutdown.Both)
}
catch (Exception ex)
{
LogException(ex)
}
myServer.Server.Close(0)
...
We are moving large amounts of data on a LAN and it has to happen very rapidly and reliably. Currently we use windows TCP as implemented in C++. Using large (synchronous) sends moves the data much faster than a bunch of smaller (synchronous) sends but will frequently deadlock for large gaps of time (.15 seconds) causing the overall trans...
In sockets I have written the client server program. First I tried to send the normal string among them it sends fine. After that I tried to send the hash and array values from client to server and server to client. When I print the values using Dumper, it gives me only the reference value. What should I do to get the actual values in c...
I have an application which does some socket communication with some hardwares.
Assume for the particular hardware i have an object and this object initiates a thread which listens on a particular port number say 5001 infinitely until a connection is established.
Now if i delete this obect is there anyway by which i can ensure that the ...
Hi,
I'd like to write some messages to the server.
Each time, for the tramsmitting only, I'm closing the outputStream and reopen it when I have to send the next message.
os.write(msgBytes);
os.write("\r\n".getBytes());
os.flush();
os.close();
How Can I keep this Socket's OutputStream, os, open and still be able to send the message?
...
I am working on a java program that is essentially a chat room. This is an assignment for class so no code please, I am just having some issues determining the most feasible way to handle what I need to do. I have a server program already setup for a single client using threads to get the data input stream and a thread to handle sending ...
i use this (http://www.codeproject.com/KB/IP/Socks.aspx) lib in my socket programing in c++
and copy the socks.h in include folder and write this code:
#include <windows.h>
#include <winsock.h>
#include <stdio.h>
#include <conio.h>
#include <process.h>
#include "socks.h"
#define PORT 1001 // the port client wil...
Is there any way to have socket.socket.recv run with hidden input. For example, if I was asking for a password I would want the input to be hidden, as if I were running the "sudo" bash command.
Edit:
socket.socket.recv asks for data on the remote end. When you are connected to the server it will ask you for text and when you type it in i...
Let's say I've programmed an application which connects to a server using the Socket Class (TCP). If I encounter a SocketException while reading or writing, then obviously I have to do go ahead and run a disconnection routine to change the application's state to Disconnected.
But what if I've started to Disconnect, and while I'm cleanin...