inet-socket

What does Java InetSocketAddress look like .toString()?

你离开我真会死。 提交于 2021-02-05 08:06:26
问题 I'm doing a .toString() on an InetSocketAddress. This is part of an Android websocket client that so far is failing to connect to the host. Right now the output from a variable address.toString() looks like domain.com/72.xx.xxx.xx:8000 but from what I understand there needs to be two values (IP and port) only? Thanks letting me know if this looks correct. 回答1: The toString() of InetSocketAddress first calls the toString() of InetAddress and then appends the port number to it and the string

How can I map a local unix socket to an inet socket?

牧云@^-^@ 提交于 2019-12-06 10:20:07
问题 I'm curious if it is possible to map a UNIX socket on to an INET socket. The situation is simply that I'd like to connect to a MySQL server. Unfortunately it has INET sockets disabled and therefore I can only connect with UNIX sockets. The tools I'm using/writing have to connect on an INET socket, so I'm trying to see if I can map one on to the other. It took a fair amount of searching but I did find socat, which purportedly does what I'm looking for. I was wondering if anyone has any