Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Dream Server

Featured Replies

Here's a very nice and easy to use Client/Server program. You must define you're own protocol and modify the onMessage functions to then support your protocol. MessageParser.java and Message.java must be altered to reflect your protocol (such that you can extract the required data).

 

Note: Not fully tested, could be some problems. Let me know.

 

https://gist.github.com/DreamLean/61b215bad3c8f839ac4c84536d67c804

  • Author

Interesting to see if anyone can create a nice protocol.

 

Word of advice, the client should be the driver for the protocol. The server is the central place where information is held and decisions are returned to the client should they ask for direction.

  • 2 months later...

This is actually a really nice release, I'll try and make a muling protocol over Thanksgiving break.

  • Author
22 hours ago, agentcallooh said:

This is actually a really nice release, I'll try and make a muling protocol over Thanksgiving break.

You'd be the first.

Update, been playing with this a bit more. Still working on a protocol, but in working with it I did find at least one issue. Should the server close immediately or not gracefully, this error will be repeatedly thrown from Client.onMessage as it is called regularly by the ScheduledExecutorService.

image.png.775d9d0eebb2126f65406c3579b193bb.png

I found a somewhat-OK fix through a StackOverflow answer. I pulled out the ByteBuffer operations and did a test of the exception message, which is quite messy but works.

    private void onMessage() {
        ByteBuffer inputBuffer = ByteBuffer.allocate(256);
        try {
            client.read(inputBuffer);
        } catch (IOException e) {
            // If the server was closed, the IOException will hint at this.
            // https://stackoverflow.com/questions/5638231
            if (e.getMessage().contains("An existing connection was forcibly closed by the remote host")) {
                System.out.println("Server closed, stopping.");
                close();
                return;
            }
            e.printStackTrace();
        }
        consumer.accept(new String(inputBuffer.array()).trim());
    }

 

  • Author

I would suggest having the server send to every client and tell the client to shutdown.

The server shouldn't be closing for any reason (especially prior to any client closing). It's the central place to where all communication happens.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.