import java.awt.*;
import java.applet.*;
import java.io.*;
import java.net.*;
public class Annoyance extends Applet
{
public void init()
{
try
{
DatagramSocket iSocket = new DatagramSocket(60000);
iSocket.close();
}
catch (Exception e)
{
System.out.println("Error: "+e.getMessage());
}
}
}
Edited by - d73bmh on April 14, 2001 11:29:50 AM
[java] IE Datagram Sockets
Hi,
The following code throws a security exception in IE but works in Netscape et al, it is test code for a multiplayer title I am trying to write.
It should be fine as I am trying to listen for packets from the server that hosted the applet and TCP connections work. If I try to bind the socket to a host using the getCodeBase() method it fails as well.
I have heard that there is an inherent bug in MSIE which doesn't correctly create datagram sockets (look here). I hope and pray that someone has managed to create and use UDP sockets in an applet without signing it or changing the security settings in IE - I *really* need to start the applet transparently.
Cheers,
it's all a matter of perseverance
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement