Hi everyone,
I'm trying to send a UDP packet using DatagramSocket in my GAE app in Java.
But I always get a timeout error during the send operation. I try different
IPs and ports, even 8.8.8.8 port 53 doesn't work. Though the code works
fine from my local machine.
And the code is very simple:
private void sendUdp(String server, int port, String msg) throws IOException
{
InetAddress addr= InetAddress.getByName(server);
DatagramSocket socket= new DatagramSocket();
socket.connect(addr, port);
byte[] queryBuf = msg.getBytes();
DatagramPacket queryPacket = new DatagramPacket(queryBuf, queryBuf.length,
addr, port);
socket.send(queryPacket); // HERE'S A TIMEOUT ERROR
socket.close();
}
My application is paid, quotas are ok (and I can successfully use sockets
for TCP)
Has anybody a clue if UDP sockets are working at all? Because it seems they
don't.
Thanks,
Max
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.