can we use POSIX sockets in iPhone
Can i use POSIX sockets in iPhone OS? ...
Can i use POSIX sockets in iPhone OS? ...
Hi all, In one of my personal project I am developing a basic SMTP server in php. It's ready and working when I launch it on its own from the command line; I access it correctly through telnet and it is responding correctly to SMTP commands and I access it correctly also from a php script sending an email using this server. Now I have ...
Here is the scenario: An user have access to two machines These machines can't communicate with network sockets because of firewall restrictions But, both have access to a common network share with read/write permissions on a third machine My question is: is it possible to write a small application executed on both machines that al...
Hi chaps, I am trying to read an HTTP packet via a socket in ruby, and for some reason my code keeps on blocking whilst calling recv socket = TCPSocket.new("localhost",80) socket.send r.join("\r\n"), 0 socket.flush #We're only interested in the string "HTTP/1.1 XXX" if http_status = get_http_status(socket.recv_nonblock(12)) if http_...
Hi, i use a UDP-socket for sending/receiving objects. I serialize the objects into a byte array send it and receive it with a client. But before i can receive i have to allocate a byte array. I must do it before and then handle the Socket.Receive()-methode the array. But my objects have a variable length. How can i discover the array-si...
I would like to use the socket adapter instead of Curl for my code but however this the problem i am facing. (case 1 :) I am querying a server for response using Zend_http_client (default socket adapter) and I am getting a 404 error, (case 2 :) while, for the same server as above, I am getting a response back when using CURL adapter wi...
Hi, Could anyone direct me as to whether there is a special way of sending images (specifically .jpeg files) across a tcp socket? So far I am developing a webserver that seems to send all the text data well. When it comes to jpeg images, the headers are sent however, the Cygwin console just freezes when it comes to sending the actual da...
How is struct sockaddr different from struct struct sockaddr_un ? I know that we use these structures in client-server modules,for binding the socket to the socket address.And we use a cast operator for it to accept struct sockaddr_un. I want to know how different/similar are they,and why the cast operator? ...
I'm trying to build a Python application using pyGTK, treads, and sockets. I'm having this weird error, but given all the modules involved, I'm not entirely sure where the error is. I did a little debugging with some print statements to narrow things down a bit and I think the error is somewhere in this snippet of code: self.sock = ...
hi, im trying to write a simple web server in java. right now ive only got a simple program but id like to extend it so that it can serve multiple browsers by establishing multiple tcp connections. ive been reading about threading. my understanding is that you can make a new thread and that will continue as if its another program ent...
I am just getting started in using sockets to communicate to my Flex application as I require fast communication between the client and my server. I had a look at PHP sockets, but as PHP wasn't made to be run on a server in that way (you can, but I get the feeling it is frowned upon) I am not sure whether PHP is the best method of commu...
Hi, is there a way to bind multiple listening TCP sockets on the same {IP, port}? I know I can just open a socket, bind, fork and then listen in each of the processes. But I'd like to do the same with separate processes that cannot fork after binding. Is there some way to allow this and not get the "Address already in use" error? The on...
Hey gang, I'm working on my first homework project in a web programming class, which is to write a simple web server in Java. I'm at the point where I have data being transmitted back and forth, and to the untrained eye, my baby server seems to be working fine. However, I can't find a way to send appropriate responses. (In other words, ...
I created a java application a year ago which is basically a multithread socket server for a website. I built this around a tutorial, which I expanded to do many things, including live multiplayer game with Flash client. The tutorial I used is the following (in french): http://defaut.developpez.com/tutoriel/java/serveur/multithread/ It...
Hi all, This is what I'm planning to do. Suppose there are 2 machines A and B. I need to create an application by which machine A can send data to Machine B, using Java SE. I know that to make a connection you need to create an object of serversocket class and use the accept() method as In Machine B: ServerSocket ss=new ServerSocket(...
Hi all, I'd have a question regarding java SocketChannel. Say I have a socket channel opened in blocking mode; after calling the the write(ByteBuffer) method, I get an integer describing how many bytes were written. The javadoc says: "Returns: The number of bytes written, possibly zero" But what exactly does this mean? does this mean t...
I'm using a Java socket client. In a case where the server is still connected to my client but it does not send a response to my message - I eventually get a read time out exception. In that case I want to test to see if I should reconnect my socket or just keep it an re-use it. I use this condition: if (!socket.isConnected() || socke...
Hello, I'm working on an application that reads and writes binary data from and to a socket. So first I create a socket with TcpClient. But I'm stuck on reading the data from the socket. Are there any code samples on how to read binary data from the socket? Concrete, there are 2 things I don't understand. First, how do I know if a mess...
I have stumbled on a peculiar difference between Solaris 10 sockets and other Linux/*NIX sockets. Example: int temp1, rc; temp1 = 16*1024*1024; /* from config, a value greater than system limit */ rc = setsockopt( sd, SOL_SOCKET, SO_RCVBUF, &temp1, sizeof(temp1); The code above will have rc == 0 on all systems - Linux, HP-UX and AIX ...
Hey guys, I've had quite a bit of success implementing the Socket class in AS3, particularly with making HTTP requests to retrieve binary (images) or ascii (JSON) data. However, I need to be able to be flexible between HTTP and HTTPS - so given the current state of AS3's Socket class, this becomes a problem. My question isn't necessar...