Hi, I am creating a server in python (what it is doing is irrelevant), but I would like it to accept telnet connections and provide a command line interface with line editing capabilities (tabcompletion, emacs/vi-mode, etc) and history per session. I have successfully created the telnet session, disabled line mode and enabled server echo...
What is the max value of the port i can assing on my socket when i do a bind
example:
int port = 0; //How far can i go?
Socket m_mainSocket;
m_mainSocket.Bind(new IPEndPoint(IPAddress.Parse("127.0.0.1), port))
Thanx
...
How can I know if the message has been sent by Tcp Socket in C# without client reply?
...
Hello. Where I work we are in need of a protocol capable of:
User login/logout
Send/recive instructions
Send/recive files
Send/recive audio stream(could use RTP)
Send/recive small XML files Use
cryptography for all those.
It will be implemented in java. So I have some questions, since I´ve never implemeted a network protocol yet.
I...
How can I open a specific port in android?
I have a server socket but the connection is rejected because the port is closed.
try {
ServerSocket server = new ServerSocket(2021);
Socket client = server.accept();
} catch (Exception e) {
// TODO Auto-generated catch block
a = false;
e.printStackTrace();
}
...
I have the following code to open a raw socket and send over it. In the send function I have a trace statement showing me that the length of my packet is 21. However, when I view the packets on the receiving end using a packet sniffer, I see:
The actual packet length is 60.
The length (as given in the 802.3 header) is 256.
Neither of...
Hi,
I'm writing a windows driver (of course in c and I'm in kernel mode) and I'd like to open a tcp socket from the outside specifying the sequence number the first SYN packet should have.
I tried modifying the packet filtering it with Windows Filtering Platform, but of course it doesn't work because the stack think that the correct num...
Hi, friends.
I have a general socket programming question for you.
I have a C struct called Data:
struct data {
double speed;
double length;
char carName[32];
struct Attribs;
}
struct Attribs {
int color;
}
I would like to be able to create a similar structure in Java, create a socket, create the data...
Hello,
which is the beast approach to send packets that can be of different size using TCP sockets in C?
I wonder because we're trying to write a multiplayer games that needs a protocol which has many kinds of packets of different sizes.. according to recv documentation I can get how many bytes have been read but how should I manage to ...
Hi,
I need to develop and test an application in Windows Mobile 6 for socket Programming in c#. I have done it in Windows Desktop application (i.e Creating a Windows Console Application that acts as a Server and listens. Then a Windows Form Application that is the client. Has a button and textbox. When i press the button the client gets...
I have encountered a problem where even after my server side close()-ed the socket, the client side still can do a single write(), only the second write() will return SIGPIPE, this causes me to loose data as I do not have application level handshake and solely relying on the return value of write(). Is there a way for me to get SIGPIPE s...
Hi,
The .NET method Socket.AcceptAsync() has a neat feature: The ability to specify an initial buffer that will receive some amount of data immediately after accepting the new connection. This could be useful for exchanging a fixed-length signature, protocol header, session ID or similar initiatory data (and in fact, that is what the MS...
I have followed a tutorial on http://www.codeproject.com/KB/IP/beginningtcp_cpp.aspxt
which teaches how to use winsockets with c++, i finally managed to get my program to work, by testing wiht 127.0.0.1, i can open two process instances of my program and then make one listen on port (700) and then connect to it with the other program on...
I'm building a C library we have using the Android NDK build chain. Things are working in general, but the following section is causing problems:
#include <netdb.h>
...
struct addrinfo* addr_result;
struct addrinfo hints;
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_INET;
hints.ai_socktype = SOCK_STREAM;
...
So I have an android application that needs to connect to a socket server. That's simple enough if the socket server was running on my development machine. However the socket server is running on a server not only not on my own machine, but on a different subnet. How would I connect my emulator to the socket server? I understand how the ...
I just wondering what java does when we call close on the inputStream and outStream associated with a socket. What is the difference from the close call on the socket, i.e Socket.close().
if we just close the io stream on the socket, but not close the socket, can we reopen the io stream on the socket again?
Thanks in advance!
...
It seems that the server is limited at ~32720 sockets...
I have tried every known variable change to raise up this limit.
But the server stay limited at 32720 opened socket, even if there is still 4Go of free memory and 80% of idle cpu...
Here's the configuration
~# ulimit -a
core file size (blocks, -c) 0
data seg size ...
I have a socket that I want to timeout when connecting so that I can cancel the whole operation if it can't connect yet it also want to use the makefile for the socket which requires no timeout.
Is there an easy way to do this or is this going to be a difficult thing to do?
Does python allow a reset of the timeout after connected so t...
The _ssl.sslwrap function appears to check to see if the sock passed in is a subclass of _socket.socket. I am passing in a class that implements the interface of _socket.socket.
It gets mad because my socket isn't a subclass. Is this something I should fix on my side, or is this something that I should ask about from the python-dev gu...
Hi,
im trying to connect to a wsdl service ,
but getting this error:
wsdl error: Getting http://api.didww.com/api/?wsdl - HTTP ERROR: socket read of headers timed out
locally there is no problem, but on the remote server i get this error.
remote server: Linux CentOS (FreePBX)
the code:
$client = new soapclient($site, true);
$err ...