Jump to content

Error with Sockets


whipz

Recommended Posts

Hey guys, I am trying to get socket to work, but getting this error on server side

any pointers ?

 

	ERROR][04/13 12:16:34 PM]: Uncaught exception!
java.security.AccessControlException: access denied ("java.net.SocketPermission" "localhost:14444" "listen,resolve")
    at java.security.AccessControlContext.checkPermission(Unknown Source)
    at java.security.AccessController.checkPermission(Unknown Source)
    at java.lang.SecurityManager.checkPermission(Unknown Source)
    at org.osbot.SA.checkPermission(xg:280)
    at java.lang.SecurityManager.checkListen(Unknown Source)
    at java.net.ServerSocket.bind(Unknown Source)
    at java.net.ServerSocket.<init>(Unknown Source)
    at java.net.ServerSocket.<init>(Unknown Source)
    at SocketMule$server.run(SocketMule.java:45)
    at java.lang.Thread.run(Unknown Source)
 
	

Link to comment
Share on other sites

3 minutes ago, whipz said:

What doesnt make sense ? and can I use a socket to connect to a standalone then ? its for muling at this stage, but I want to add more to it

A server by definition should have high uptime, not even the runescape game meets a minimum of 99% uptime requirement. Consider writing an actual server application. 

  • Like 1
Link to comment
Share on other sites

Yes, if you want to communicate with multiple accounts you should have one server application that is using ServerSocket, like Token said. You can then use Socket to connect to that server application (hosted on some server) in which you wanna have logic that can relay a message to the client you want. E.g. Client1 -> Server -> Client2. I'd probably use some small framework though, that already handles all connections etc. otherwise it's pretty time consuming to write. You could use kryonet for this in which you want to send with TCP, or you can use another protocol entirely, called websocket (which is especially useful if you ever want to build a webinterface around it): https://github.com/TooTallNate/Java-WebSocket

Edited by Reveance
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...