• Welcome to Valhalla Legends Archive.
 

Please Slain my idea into prespective

Started by Ringo, November 15, 2005, 03:14 AM

Previous topic - Next topic

Ringo

Well, one socket would have to use 6120 :P
SC would be talking with the 7 tmp sockets, and the host would be talking to the 7 reall players.
It all depends what ports are avalible when i bind() them all

Kp

Quote from: Ringo on November 17, 2005, 09:48 PMwhat ports are avalible when i bind() them all

"... one bot to rule them all, and in the darkness bind() them."
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Explicit

Quote from: Kp on November 17, 2005, 11:35 PM
Quote from: Ringo on November 17, 2005, 09:48 PMwhat ports are avalible when i bind() them all

"... one bot to rule them all, and in the darkness bind() them."

What the hell? lol
I'm awake in the infinite cold.

[13:41:45]<@Fapiko> Why is TehUser asking for wang pictures?
[13:42:03]<@TehUser> I wasn't asking for wang pictures, I was looking at them.
[13:47:40]<@TehUser> Mine's fairly short.

Ringo

uh, im getting confused, i suck at this :(
I genealy find a free port like so:


Dim i as integer
for i = sockets.lbound to sockets.ubound
    BNCS_BIND(Sockets(i), 6112 + i)
next i


Public Sub BNCS_BIND(SOCK As Winsock, Optional PortRange As Long = 6112)
    Dim MyIP As String
    Dim FreePort As Long
    Bnet.BNCSIP = GFini("Setup", "BNET Address")
    Bnet.BNCSPort = CLng(GFini("Setup", "BNET Port"))
    MyIP = SOCK.LocalIP 'my internet IP (if accessable)
    FreePort = PortRange
    Bnet.UDPStamp = &H0
    Do Until FreeBind(SOCK, FreePort) = True
        FreePort = FreePort + 1
    Loop
    SOCK.RemoteHost = Bnet.BNCSIP
    SOCK.RemotePort = Bnet.BNCSPort
End Sub

Public Function FreeBind(SOCK As Winsock, ByVal PortRange As Long) As Boolean
    On Error GoTo NextPORT
    With SOCK
        .Close
        .Bind PortRange, .LocalIP
    End With
    FreeBind = True
    Exit Function
NextPORT:
    If Err.Number = 10048 Then
        FreeBind = False
    Else
        FreeBind = True
        Call ShowChat(vbRed, "[UDP] Bind Error:" & Err.Number & " Unable to bind " & Err.Description)
    End If
End Function

Don Cullen

Lol... Ringo, when Kp said what he said, he was quoting from the 'Lord of the Rings' movies. Amusing reference. :) It wasn't related to what you were saying, he was just being amusing by playing with the word bind() when you mentioned that word :P
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.

Ringo

Heh, I thought he was under the impression i was binding them in the darkness/blind :P
Its all constructive comments, witch is what i wanted tho :)
Kp knows alot more about this kinda stuff than me :P

Kp

Quote from: Kyro on November 20, 2005, 12:12 AMhe was just being amusing by playing with the word bind() when you mentioned that word :P

Actually, bind() alone wouldn't have been enough to merit the joke.  But when it was "bind() them all", it seemed appropriate.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!