sockets

Problem about socket communication

I have two separate socket projects in VS.NET. One of them is sender, other one is receiver. After starting receiver, i send data from sender. Although send method returns 13 bytes as successfully transferred, the receiver receives 0 (zero). The receiver accepts sender socket and listens to it. But cannot receive data. Why? P.S. : If se...

Java: What are the various available security settings for applets

I have an applet that throws this exception when trying to communicate with the server (running on localhost). This problem is limited to Applets only - a POJO client is able to communicate with the exact same server without any problem. Exception in thread "AWT-EventQueue-1" java.security.AccessControlException: access denied (java.net...

Resetting the InputStream of a Java Socket after reaching EOS.

I'm attempting to connect two separate applications via a TCP/IP socket. In this case neither of the applications is running as a "client" of the other, it would be easier to describe them as two separate servers who need to communicate with each other. To receive the data I'm using the InputStream.Read() function and once it receives a...

How can I obtain the IPv4 address of the client?

Hello! I'm prepping for a simple work project and am trying to familiarize myself with the basics of socket programming in a Unix dev environment. At this point, I have some basic server side code setup to listen for incoming TCP connection requests from clients after the parent socket has been created and is set to listen... int sockf...

How the reading from and writing to sockets are synchronized?

We create a socket. On one side of the socket we have a "server" and on another side there is a "client". Both, the server and client, can write to and read from the socket. It is what i understand. I do not understand the following things: If a server reads from the socket, does it see in the socket only those stuff which was written ...

Why this hostname looks so strange?

I use DNSSD.resolve() method to get information about a service found by Bonjour. I was able to get the port of the found service as well as its hostname. However, the hostname looks not as I expected. I thought it will be an IP address but it is equal to ID00926.local.. What is that? Can I use it as an IP address to create sockets in Ja...

How to implement a hub in Python

Dear all, I need to implement a TCP server in Python which receives some data from a client and then sends this data to another client. I've tried many different implementations but no way to make it run. Any help would be really appreciated. Below is my code: import SocketServer import sys import threading buffer_size = 8182 ports = {...

Why it cannot find getInputStream?

I have this code: ServerSocket serverSideSocket = new ServerSocket(1234); serverSideSocket.accept(); BufferedReader in = new BufferedReader(new InputStreamReader(serverSideSocket.getInputStream())); And compiler writes me that it cannot find "getInputStream". I do not understand why. In the beginning of my code I do im...

Choice for Socket Server Application: C/C++ or C#

What would be the most sensible choice for building a socket server application, assuming that you had the luxury of choosing between C/C++ or Csharp, and you intend to run multiple instances of the same server on both Windows and Linux servers? ...

How can I obtain the local TCP port and IP Address of my client program?

Hello! I'm prepping for a simple work project and am trying to familiarize myself with the basics of socket programming in a Unix dev environment. At this point, I have some basic server side code and client side code setup to communicate. Currently, my client code successfully connects to the server code and the server code sends it a ...

How can I obtain the IP address of my server program?

Hello! This question is related to another question I just posted. I'm prepping for a simple work project and am trying to familiarize myself with the basics of socket programming in a Unix dev environment. At this point, I have some basic server side code and client side code setup to communicate. Currently, my client code successfully...

How do I make a web interface for a socket server

I've got a socket server running (it's something that's basically like a chat server). Users can telnet into it, but I'd like to make a web interface. This is the first time I've ever done something like this, so I'm not really sure where to start. A few thoughts I've had: Have some server-side Python (or PHP) on my webserver, which...

Broadcast-style Bluetooth using Sockets on the iPhone?

Is there any way to open a broadcast bluetooth socket, take a listen and send replies? I want a proper peer to peer system where I broadcast and listen for broadcasts in an area. That way, variable clients can mingle. Is this possible? My theory is this: If GameKit can sit around wasting 25 seconds of the users time whilst having ac...

forkpty - socket

Hi, I'm trying to develop a simple "telnet/server" daemon which have to run a program on a new socket connection. This part working fine. But I have to associate my new process to a pty, because this process have some terminal capabilities (like a readline). The code I've developped is (where socketfd is the new socket file descriptor...

Socket Printing issues: PHP/Toshiba B-SA4TM

Hi, we're having this toshiba barcode printer. I'm not sure whether this problem is hardware or php related. When we send a ° (degree-sign) it prints a € (euro-sign). I also tried brute-forcing iconv(): $a = array("UTF-8", "ASCII", "Windows-1252", "ISO-8859-15", "ISO-8859-1", "ISO-8859-6", "CP1256", "cp850"); foreach ($a as $enc){ if ...

flex application resets connection when using XmlSocket

I am flex newbie and I am trying to get the example given here :http://livedocs.adobe.com/flex/3/html/help.html?content=17_Networking_and_communications_5.html I am using the same java server given there. and I am creating the XmlSocket in a flex air application. When I run my air application I get a java.net.SocketException connection...

Socket throughput on localhost?

I've got an app that's using sockets to push data, and I'm currently testing it on my localhost (so that the sender and receiver are on the same computer). I'm seeing between 36 and 66MB/s of throughput, which seems somewhat slow to me. What are normal throughput ranges for binary data on a local socket connection? ...

Can boost::asio only receive full UDP datagrams?

I am working on a UDP server built with boost::asio and I started from the tutorial customizing to my needs. When I call socket.receive_from(boost::asio::buffer(buf), remote, 0, error); it fills my buffer with data from the packet, but, if my understanding is correct, it drops any data that won't fit in the buffer. Subsequent calls to re...

How does System.Net.Mail.SMTPClient do its local IP binding

We have a load balanced (NLB) ASP.NET web app which sends email. The servers are dual homed with an external facing and internal (behind firewall) facing IP. The Mail server is behind the firewall. We have been seing a problem where the SMTPClient class throws an exception stating it is unable to connect to the SMTP server. The net...

Transmission and verification of certificate (openssl) with socket in c

Hello, guys, I have to write these codes in c. I have already generate the certificate of one terminate t1: t1.pem, which is generated by openssl. The communication between the terminates t1 and t2 has been established via socket in c. Now I want to send this certificate to another terminate t2.and I want t2 to receive the certificate,...