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.

Help with .NET Sockets C#

Featured Replies

Ok. Im trying to create a simple TCP Client / Server. The problem I'm having is with !System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it.

My best bet is that the socket listener is not working, but I could not figure out why. Any help is appreciated. 

public partial class Primary : Form
    {
        public static int port = 80;
        public static TcpListener listener = new TcpListener(IPAddress.Any, port);
        public static Thread conn = new Thread(awaitConnection);

        static void awaitConnection()
        {
            listener.Start();
            listener.AcceptSocket();
            MessageBox.Show("New Connection received.");
        }

        public Primary()
        {
            InitializeComponent();
        }

        private void Primary_Load(object sender, EventArgs e)
        {
            conn.Start();
        }

        private void toolStripStatusLabel1_Click(object sender, EventArgs e)
        {

        }
    }

and

 class Program
    {
        public static TcpClient client; 
        public static int port = 80; //Connection port
        public static string ipaddress = "25.52.118.139"; //Connection IP Address

        static void Main(string[] args)
        {
            client = new TcpClient();
            try
            {
                do
                {
                    client.Connect(IPAddress.Parse(ipaddress), port); 
                    //Establish and maintain connection until it's no longer available.
                } while (client.Connected != true);
            } catch(Exception err)
            {
                Console.WriteLine ("Error!" + err);
            }
        }
    }

 

  • Author

Tried multiple different ports. Currently usins 32567, still the same.

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.