Networking
Visit us here and  you will find
much more tips!
Receive our  newsletter with new tips!  Almost 6,000 subscribers (by June 2001) can not be wrong! 
They read our tips every week! 
 To subscribe to The Java FAQ Daily send empty e mail to:
javafaq tips subscribe@topica.com
  or visit at:
http://www.topica.com/lists/javafaq tips/
 Networking
I have difficulty understanding what is the difference between sockets
and ports. They seem to be doing the same thing, receiving/sending
data streams to other computers over network.
Answer: A port is a software address on a computer on the network  for instance, the
News server is a piece of software that is normally addressed through port 119,
the POP server through port 110, the SMTP server through port 25, and so on. A
socket is a communication path to a port. When you want your program to
communicate over the network, you have give it a way of addressing the port, and
this is done by creating a socket and attaching it to the port.
basically, socket = IP + ports
Sockets provide acces to the port+ip
We were trying to write a mail client using sun s javamail. I was wondering if there is a way
to set the priority of the message.
Commercial mail clients does this by setting the X priority: field of the smtp header ( 1
means highest and 5 means lowest   I think the rfc allows much more than this ). Looking at
the documentation I could not find any way. I was wondering if any of you have done anything
similar.
Answer:  Look at MimeBodyPart::addHeader(String name, String value);
You can add any headers allowed by the RFC spec. : )
I am trying socket level programming through firewalls. Could somebody tell what Http
tunnelling is and how to achieve that using Java 2?
Answer: As an aside, how do you request your proxy server to fetch a page from the net?
http://developer.java.sun.com/developer/technicalArticles/InnerWorkings/Burrowing/index.html
How can I let dial a phone number with a modem in a Java app.? Is there a way without a
System.exec() call and without any M$ classes?
Answer:  You could use javax.comm to do it manually via the serial port and the good old AT
command set on the modem. Alternatively, you might look at JTAPI, but that might have its
file:///F|/a_jsite/350_tips/networking.htm (1 of 4) [2001 07 08 11:24:57]






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

java web hosting

 

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved