Does anybody know how to receive (how to know that you received) out-of-band data with Java sockets? In particular I've read the documentation for sendUrgentData and setOOBInline ... |
I have written a socket program where the client uses readUTF() and writeUTF() to communicate with the server while the server uses read and write() to communicate with client.
Actually My server ... |
I have been reading the descriptions of referencing in Java, and, while I feel I understand them, I am not sure if Java allows me to do the following: we have ... |
I have written a socket program using read() and write().
Whenever I want to send large data using write(). I am unable to recieve data at a time. Means my data is ... |
May be i am not able to express my doubt properly in this question but still i will try. Basically i created a simple socket based chat program and everything works ... |
Java newbie here. Are there any helper functions to serialize data in and out of byte arrays? I am writing a Java package that implements a network protocol. So I have ... |
I am developing an application to communicate with a third party application through socket. Basically, my application needs to send some requests to the server, and the server returns some data. ... |
|
I am developing a socket application and my application needs to receive xml file over socket. The size of xml files received vary from 1k to 100k. I am now thinking ... |
We have huge record set on AIX box that we send over network to Linux box and process it.
Each record is about 277 bytes in size.
complete flow is like:
i) Program A ... |
I'm writing first socket project.
I've got a problem .. When client sends String to server, server can't got this message.
public class ClientActivity {
public static final ...
|
I'm programming a server (java) - client (Android/Java) application. The server is a W7. All the communication goes well until one read in the client that freezes and stops reading data ... |
I am currently sending large amounts of data over a Java socket, and I am using the Apache Commons IOUtils library to copy using the copyLarge method to send/receive ... |
I am trying to implement a data transfer between programs in Java (Client) and Firefox extension in JavaScript (Server). I can't send and receive using one socket only. Help me to ... |
I have a requirement to send data from native program written in C through Sockets, namely the winsock interface. That data is then received by a java program. The Java program ... |
I am writing a auction server and client and using a class called BidHandler to deal with the bids another class AuctionItem to deal with the items for auction. The main ... |
|
sir , i am working on a project which requires connection through through modem i am able to connect to the modem using commapi and At commands for modem. but I am notable to bring the modem in the data mode . ps help me how to that. which at command is there foe the same thing. thanking you nishesh |
|
The application which I am developing is a typical client-server app using Java sockets with TCP/IP. I am using bufferedinputstream and a byte array of size-1024. I will be transferring multiple files one after the other. Information regarding the file is send as a header splitted by delimiters. This info is extracted to get the file name as well as size. ... |
Hi all. I was wondering if someone could fill me in on why I can't receive responses from an application. Have been using TCPdump to watch the network communication between the client I'm writing and the server on the other end. I have no trouble sending data to it through the socket that I've created. When the server replies with a ... |
|
|
|
I am writing a new charter applicatiuon for a bus company and I'm having trouble reading changes from the server. The changes are made properly, but the data returned is only what the client already has. If a new client is started after the changes have been made, the new client gets teh changed data, but further changes are ignored. THe ... |
I have a problem with a socket-based application which I am writing for a module in my project I created a client socket to connected to a remote server and port. The remote server sends data to a different ip address and port instead of my connection. What I mean to say is that I get the data on a different ... |
hello, I am writing a console application to send multiple requests to the Northwest Airlines web server. As soon as I send a query string, I receive a page having a meta tag giving the url of the page where the request could be redirected. I am using the same urlConnection to first send my request, get the output from the ... |
|
Hi, I am having a client socket from where i communicate with server socket. The process flow is as follows 1) open socket 2) write data into server socket 3) Read data 4) write acknowledgement 5) Close socket The whole process is looped again and again depending on some parameter. SomeTimes(not all the time) we found from the server socket program ... |
I have never before done any programming using SSL or a similar technology. Now, however, for a university project I am required to protect data sent between the client (web browser) and the web application (JSP/Java).. and I really have no idea where to begin. The application resides on a WebLogic server. Ideally I would like to protect the entire application ... |
|
You're going to have to give us a little more info. TCP/IP itself doesn't have a notion of control and data packets. Are you developing a custom protocol, or implementing some existing protocol? Thank you for your replay. I am going to develop the code in Layer 2 ethernet layer. If I receive a data frame, I can find a way ... |
I played a bit more with Selector. Here is a test that allows you to print the state of a selector -the selected keys an registered ones-- as it goes on accepting new connections and reading some text files from them. The text files are shown in a text area. To the SelectionKey of a newly accepted connection I attach a ... |
Hi. I need to write a program that will allow me to monitor the traffic that's being sent or received by a third party program, let's call it 'A'. My questions are 1) Is it possible, from within a javaprogram, to listen to the specific port that 'A' uses? 2) If 1) is not possible, is it possible to launch 'A' ... |
|
Welcome to the JavaRanch, Sanju. Your first system out says the value of out is "enter password" but your first if statement is looking for "enter password:". I'd say that's a problem. It's a good practice when you have a bunch of "if"'s checking for various conditions to have one last "else", even if it only prints out "this should never ... |
I have taken some socket examples and changed them to fit my needs. My code does everything correctly except some characters are missing. This is what it should be: MSH|^~\&|BEMRX||PYXISRX||200701031628||^~\&^RDE||P|2.3| this is what I get: SH|^~\&|BEMRX||PYXISRX||200701031624||^~\&^RDE||P|2.3| So it cuts off the first letter. Here is my code Client Code: Socket echoSocket = null; PrintWriter out = null; BufferedReader in = null; ... |
We're confused too; none of these are "applications", and several of them are not classes from the standard API, so I don't know if they're supposed to be fake, or if they're part of some library or other. The "Datagram" classes in the standard API work with UDP, which is an "unreliable" (no guarantee) protocol, while "ServerSocket" is, by default, implemented ... |
Hi guys, it seems that I have to take your time with my dumb question again This time I am transporting various data types(int[][], int[], and boolean) through TCP/IP connection. Last time I succeeded in transporting those data types using an object (I put all those data types into an object, provided the get/set implementation, and send the whole object). The ... |
|
I am sorry about that. The data is an xml file that is converted to a byte array. I have changed my approach a little and am now using the following code for the client: ObjectOutputStream outData = null; InputStream inData = null; byte[] compressedData = new byte[3000]; int lineRead = -1; try{ outData = new ObjectOutputStream(soc.getOutputStream()); inData = soc.getInputStream(); int ... |
Just wondering the following. During the applet session ( from init() to stop() ) I want to use the same socket connection and readers, writers created upon it. Only when stop() or destroy() are invoked, only then I want to close all streams. Should I put all the creations of sockets and streams into init() method? Or somewhere else? What about ... |
Hello everyone. I'm trying to write a client socket that connects to a mainframe. This is the first time I've used sockets, so I'm definitely green on this. Bottom line, when I connect to the server, the cursor just blinks, waiting for data. I've tried Google searches and found some good resources, but didn't find the exact answer to my question. ... |
|
Hi, We are using Socket connection to read the data from the different servers.Some times it is taking more time to read the data from the Server.We are giving max timeout as 40 sec, so after 40 sec we are getting Timeout.But when we access the same site or server the response back to the browser is very fast. We are ... |
The application which I am developing is a typical client-server app using Java sockets with TCP/IP. I am using bufferedinputstream and a byte array of size-1024. I will be transferring multiple files one after the other. Information regarding the file is send as a header splitted by delimiters. This info is extracted to get the file name as well as size. ... |
Hi, The lenght coming from socket varies for each request. The data coming from socket is binary data. I am using the following code and it taking more than 45 seconds to read the binary data. How do I read the data fast? Any help on how to read the binary data fast from socket ? try { reader = new ... |
I know this is a broad question and I'm not even sure I'm stating it properly, but basically here's what I want to do: 1. There will be programs that attempt to open a connection to outside sources (like an email client) 2. I want all data that they send over that line to be readable by my program without need ... |
//// < import java.io.*; import java.net.*; import java.util.regex.*; import java.io.FileOutputStream; import java.io.IOException; import java.util.ArrayList; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.Result; import javax.xml.transform.Source; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.TransformerFactoryConfigurationError; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import org.w3c.dom.Attr; import org.w3c.dom.Comment; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.w3c.dom.Text; import org.xml.sax.InputSource; import org.xml.sax.SAXException; public class Spider{ Document document; public static ... |
|
|
Hi, In http response header I am seeing "Transfer-Encoding: chunked". Each chunk comes with a header indicator on the length of chunk. While reading response from socket and appending it to string buffer, the chunk header is also getting in as part of response. How to avoid this unwanted part (Chunk length) from getting to my final response string. Here is ... |
Hello all. I would really appreciate some help on the following matter: First of all, here is the code: byte [] data = new byte[100]; Socket sendingSock = new Socket("192.168.1.101",4747); PrintWriter out = null; out = new PrintWriter(new OutputStreamWriter(sendingSock.getOutputStream())); //assuming that i have filled the whole data[] array out.print(data); out.flush(); So, i create a scoket, and then i fill the byte ... |
I am using the following code to connect to a server using a socket. I have three arguments being sent to the code, the server ip, port and the message. The code works fine and creates a connection to the server on the specified ip and port but they are not seeing the proper message string. Since I am using the ... |
I'm trying to establish a SSL connection to a site and return its full response back. For some reason no matter what SSL site I go to when I step through the code it seems like the first read grabs a chunk of data and all subsequent calls return 0. I did some research and it appears there are two cases ... |
Hello Mates I am in confusion. I have to transfer files over Network. I am told not to use HTTP, HTTPS or FTP in Java code but to use some other technology. Kindly tell me what currently industries are using for transferring and receiving files using Java. I am told to use JMX, is it suitable or any other technology exists. ... |
Hi, i have x, y and z co-ordinates being sent over a socket every second, i want to store these in an array and the then read the three coordinates seperatley. can someone please help! Thanks!! Code: import java.io.*; import java.net.*; import java.util.Scanner; import java.io.File; public class Combo2 { public static void main(String[] args) throws IOException { Socket kkSocket = null; ... |
Hi, I am trying to get a compact relay server running for my application. If there are say three computers, A, B and C and all three are running my application and I send something from C to A, it generally goes through B (that is, it takes multi hops). I am able to achieve this but most of the times ... |
but in operating systems the calling thread that calls blocking methods (blocking system calls or whatever) may give the hand in a fair way to let processes having processor ressources to do their tasks... and sometimes the priority of those threads are lowed (from 0 to -5 for example) to be sure they won't trash the system if something went wrong, ... |
from sender side i am sending it using C# Application by Creating DataTable and Populating it(it has 6 columns) and then using its writexml function i write xml to stringwriter object and then converting it to string and sending on socket. How can i parse it here and get individual values of columns by name here for each row sent from ... |
|
Do you happen to know the size of the send buffer? A pathetic 8192 bytes on Windows. Anything between 32k and 64k on Unix platforms. Change both the send and receive buffer sizes at both ends. When i close the socket of the server the client doesn't do anything (it feels like freezing or waiting for the data to be written), ... |
|
I suppose that the problem may be in the input buffers of the client socket... But I don't know what to do or what to try... Say that I've also test the server in a WXPSP3 and it still doesn't work. Thank you very much, Newlog. Edited by: user1175854 on 30-jul-2011 15:51 Edited by: user1175854 on 30-jul-2011 15:53 |