Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Java Socket and Wireshark Help
New Posts  All Forums:Forum Nav:

Java Socket and Wireshark Help

post #1 of 25
Thread Starter 
Not solved!

Edited by Lyoko - 6/28/08 at 4:04pm
post #2 of 25
Do you just want to view the input as hex with the text beside it? You should write a method to format it for you, but just use the String.toCharArray() method to get at the bytes.
It goes to eleven
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6300 DS3 EVGA 8600GTS 2GB XMS2 DDR2-800 
Hard DriveOSMonitorKeyboard
1.294 TB Arch Linux/XP Samsung 226bw Eclipse II 
PowerCaseMouse
Corsair 520HX Lian-Li v1000B Plus G7 
  hide details  
Reply
It goes to eleven
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6300 DS3 EVGA 8600GTS 2GB XMS2 DDR2-800 
Hard DriveOSMonitorKeyboard
1.294 TB Arch Linux/XP Samsung 226bw Eclipse II 
PowerCaseMouse
Corsair 520HX Lian-Li v1000B Plus G7 
  hide details  
Reply
post #3 of 25
Thread Starter 
Quote:
Originally Posted by rabidgnome229 View Post
Do you just want to view the input as hex with the text beside it? You should write a method to format it for you, but just use the String.toCharArray() method to get at the bytes.
I want to replicate the program that generated that. I figured out the != null was causing the problem and it's working now
post #4 of 25
It's best not to gut the thread once the problem is solved. Leave it as is so that if anybody ever has a similar problem they can see what you asked and what people said about it.
It goes to eleven
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6300 DS3 EVGA 8600GTS 2GB XMS2 DDR2-800 
Hard DriveOSMonitorKeyboard
1.294 TB Arch Linux/XP Samsung 226bw Eclipse II 
PowerCaseMouse
Corsair 520HX Lian-Li v1000B Plus G7 
  hide details  
Reply
It goes to eleven
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6300 DS3 EVGA 8600GTS 2GB XMS2 DDR2-800 
Hard DriveOSMonitorKeyboard
1.294 TB Arch Linux/XP Samsung 226bw Eclipse II 
PowerCaseMouse
Corsair 520HX Lian-Li v1000B Plus G7 
  hide details  
Reply
post #5 of 25
Thread Starter 
Looks like I didn't solve it lol. It's not showing data when I try doing
Code:
out.write(1);
post #6 of 25
What problem are you having exactly?
It goes to eleven
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6300 DS3 EVGA 8600GTS 2GB XMS2 DDR2-800 
Hard DriveOSMonitorKeyboard
1.294 TB Arch Linux/XP Samsung 226bw Eclipse II 
PowerCaseMouse
Corsair 520HX Lian-Li v1000B Plus G7 
  hide details  
Reply
It goes to eleven
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6300 DS3 EVGA 8600GTS 2GB XMS2 DDR2-800 
Hard DriveOSMonitorKeyboard
1.294 TB Arch Linux/XP Samsung 226bw Eclipse II 
PowerCaseMouse
Corsair 520HX Lian-Li v1000B Plus G7 
  hide details  
Reply
post #7 of 25
Thread Starter 
It's connecting to the server, sending a packet with no data (not a connection packet) and it's closing the socket like it should.

The problem is no data. I just want to do the same thing that was shown in the screenshot. Send 010000006a.

Code:
while ((userInput = stdIn.readLine()) == null) { //Hit enter and send
    out.write(?);
    System.out.println("Data sent!");
   }
What do I fill in for out.write to have the exact same result as what's shown in the screenshot? Once again, I have already connected to the server via socket and have PrintWriter etc.
Edited by Lyoko - 6/28/08 at 4:10pm
post #8 of 25
I have very little Java networking experience, sorry. If you post the relevant code I might be able to figure something out though.
It goes to eleven
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6300 DS3 EVGA 8600GTS 2GB XMS2 DDR2-800 
Hard DriveOSMonitorKeyboard
1.294 TB Arch Linux/XP Samsung 226bw Eclipse II 
PowerCaseMouse
Corsair 520HX Lian-Li v1000B Plus G7 
  hide details  
Reply
It goes to eleven
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6300 DS3 EVGA 8600GTS 2GB XMS2 DDR2-800 
Hard DriveOSMonitorKeyboard
1.294 TB Arch Linux/XP Samsung 226bw Eclipse II 
PowerCaseMouse
Corsair 520HX Lian-Li v1000B Plus G7 
  hide details  
Reply
post #9 of 25
Thread Starter 
bump
post #10 of 25
Can you post your server and client code. That will help us in trying to solve your problem, as right now it can be a number of things.
BlackMesa
(14 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II x6 Gigabyte XFX RF460 16gb G.Skill 
Hard DriveHard DriveOSMonitor
OCZ Vertex2 Sata II Coorsair Force GS Sata III Debian (testing) Shimian 27" 
KeyboardMouse
Filco w/ blue cherries Who needs a mouse? 
  hide details  
Reply
BlackMesa
(14 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II x6 Gigabyte XFX RF460 16gb G.Skill 
Hard DriveHard DriveOSMonitor
OCZ Vertex2 Sata II Coorsair Force GS Sata III Debian (testing) Shimian 27" 
KeyboardMouse
Filco w/ blue cherries Who needs a mouse? 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Java Socket and Wireshark Help