Comment on Tutorial - TCP Server and TCP Client in Java By Ashish Myles



Comment Added by : newbee

Comment Added at : 2015-04-15 13:21:55

Comment on Tutorial : TCP Server and TCP Client in Java By Ashish Myles
hey im a novice in java...so i have to make a connection to another machine and send data using tcp/ip!
How do i get this done?
I tried this:

import java.io.IOException;
import java.net.Socket;
import java.net.InetSocketAddress;
import java.net.SocketAddress;



Socket connection = new Socket(server,AGREED_PORT_NUMBER);
makeRequestToServer(connection);
getReplyFromServer(connection);

connection.close();

But got an error saying TYPED VARIABLE DECLARATION-OBJECT CONSTRUCTOR


View Tutorial



Ask a Question

Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. Very good basic example. Thanks a lot.............
View Tutorial          By: satish at 2010-04-15 05:39:41

2. no output as well, i'm getting portlist and portId
View Tutorial          By: raul at 2015-10-09 20:05:02

3. Nearly perfect help, but the path I had to use was
View Tutorial          By: Martin Zeltner at 2009-09-15 04:15:19

4. HI . i got the following exception while start up
View Tutorial          By: Ramesh at 2011-02-01 00:14:14

5. u can try this out it will satisify u:)
imp

View Tutorial          By: vallabh at 2014-10-04 17:44:18

6. This is very useful example for beginners.

View Tutorial          By: Amresh at 2011-02-28 22:20:11

7. Incomplete article; Singleton session bean? And re
View Tutorial          By: vaibhav sakpal at 2013-08-29 07:35:37

8. this is really very useful because of this site i
View Tutorial          By: meenakshi shukla at 2012-09-15 05:09:49

9. Dear All , I have query reg hibernate with WAS /WP
View Tutorial          By: pmr at 2011-07-18 02:58:08

10. Thanks for providing detailed information .
View Tutorial          By: CM Mankar at 2008-03-18 04:37:03