Results 1 to 4 of 4

Thread: multi client server port number overflow

  1. #1

    Thread Starter
    Banned
    Join Date
    Jun 2022
    Posts
    149

    multi client server port number overflow

    using custom online server with the port is 54845 and when am trying to use the client to connect to my server using this port then i get overflow.

    source code
    https://www.vbforums.com/showthread....ht=chat+client


    With frmChat.sckClient
    .Close
    bolRecon = False
    .RemoteHost = txtServer.Text
    .RemotePort = CInt(txtPort.Text)
    .Connect
    End With

  2. #2
    PowerPoster
    Join Date
    Nov 2017
    Posts
    3,116

    Re: multi client server port number overflow

    In VB6, the max value of an integer is 32767, so CInt(more than 32767) will throw an overflow error.

  3. #3

    Thread Starter
    Banned
    Join Date
    Jun 2022
    Posts
    149

    Re: multi client server port number overflow

    Quote Originally Posted by OptionBase1 View Post
    In VB6, the max value of an integer is 32767, so CInt(more than 32767) will throw an overflow error.
    so am i out of look using that port

  4. #4
    PowerPoster
    Join Date
    Nov 2017
    Posts
    3,116

    Re: multi client server port number overflow

    Quote Originally Posted by jenniger9 View Post
    so am i out of look using that port
    No, it just means you can't use "CInt" if you are using ports above 32767. You could try using CLng, for example.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width