Using Java 6, on linux how can I make sure to use an ipv4 socket? -


i'm trying write quick little java application read contents of pcap file (from wireshark) , play data on network on linux box. file contain udp broadcast packets, application needs timestamp, port number, , data packet need. problem application i'm trying test code listening ipv4 udp broadcasts on windows. test application keeps opening ipv6 socket send data out.

i'm using netstat -a -u -p determine socket udp6 socket. on windows know isn't.

what easiest or best way force test app on linux in java open udp or udp4 socket instead? don't want forced in providing ipv4 network address each time. want able move code machine without having remember configuration needs changed.

add -djava.net.preferipv4stack=true java application runtime properties.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -