Would it be possible for me to connect to a java server using basic Socket using a Javascript client?

Asked

Viewed 97 times

1

I am studying game development and lately considered developing a game next or even online.
There are two Ides where I can develop games, Unity3d and RPG Maker MV that use javascript.
I’m a beginner in javascript so I’m sorry for the question, but, I wonder if I can use some javascript library to connect to a server I’m developing in java?
Detail: on the server I use the basic Serversocket with lock.

1 answer

1


Yes, because sockets work with file descriptors (texts), standard concept in Unix BSD.

In a socket you send a text and receive a text, but other types of data can be transferred, depends on your API’s.

  • I can communicate even using websockets in js to connect to the java server?

  • Yes, you can, as I said in the reply you write a text and read a text. I recommend using standard HTTP communication Apis, which are implementations of text-working sockets.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.