Go to Post There are times when your team will struggle and there are times when it will achieve great victories. There will be times when unknown and uncontrollable factors will intercede to provide an unexpected outcome for which your team must compensate. - Travis Hoffman [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 30-01-2011, 18:10
alexhenning alexhenning is offline
WPILib Developer
FRC #0348
 
Join Date: Apr 2010
Rookie Year: 2003
Location: MA
Posts: 49
alexhenning will become famous soon enough
Receiving UDP packets on the CRIO

Hi,

I've been trying to receive custom data on port 1130, but I am unable to get a connection. When running the following code on the CRIO, it stops after printing "Opening socket connection." I assume the issue is with ss.acceptAndOpen(). It doesn't crash, it just stops at that point.

Quote:
System.out.println("Opening server socket connection.");
ServerSocketConnection ss = (ServerSocketConnection) Connector.open("socket://:1130");
System.out.println(ss.getLocalAddress());
System.out.println("Opening socket connection.");
StreamConnection sock = ss.acceptAndOpen();
System.out.println("Opening input stream.");
in = sock.openInputStream();
Does anybody no what I'm doing wrong? Has anyone been able to successfully read data off of port 1130 in java.

Thanks for any help.

Last edited by alexhenning : 31-01-2011 at 08:47.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:44.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi