Gambas Documentation
Application Repository
Code Snippets
Compilation & Installation
Components
gb
gb.args
gb.cairo
gb.chart
gb.clipper
gb.complex
gb.compress
gb.crypt
gb.data
gb.db
gb.db.form
gb.db.mysql
gb.db.odbc
gb.db.postgresql
gb.db.sqlite2
gb.db.sqlite3
gb.dbus
gb.dbus.trayicon
gb.debug
gb.desktop
gb.desktop.gnome.keyring
gb.desktop.x11
gb.eval
gb.eval.highlight
gb.form
gb.form.dialog
gb.form.editor
gb.form.htmlview
gb.form.mdi
gb.form.print
gb.form.stock
gb.form.terminal
gb.gmp
gb.gsl
gb.gtk
gb.gtk.opengl
gb.gtk3
gb.gtk3.opengl
gb.gtk3.webview
gb.gui
gb.gui.opengl
gb.gui.qt
gb.gui.qt.ext
gb.gui.qt.opengl
gb.gui.qt.webkit
gb.gui.trayicon
gb.gui.webview
gb.hash
gb.highlight
gb.image
gb.image.effect
gb.image.imlib
gb.image.io
gb.inotify
gb.jit
gb.libxml
gb.logging
gb.map
gb.markdown
gb.media
gb.media.form
gb.memcached
gb.mime
gb.mongodb
gb.mysql
gb.ncurses
gb.net
.UdpSocket.Multicast
DnsClient
Net
Accepting
Active
CannotAuthenticate
CannotBindInterface
CannotBindSocket
CannotCreateSocket
CannotListen
CannotRead
CannotWrite
Connected
Connecting
ConnectionRefused
ConnectionTimeout
Format
HostNotFound
Inactive
Internet
IPv4
Local
Pending
ReceivingData
Searching
Unix
SerialPort
ServerSocket
Socket
UdpSocket
gb.net.curl
gb.net.pop3
gb.net.smtp
gb.openal
gb.opengl
gb.opengl.glsl
gb.opengl.glu
gb.opengl.sge
gb.openssl
gb.option
gb.pcre
gb.pdf
gb.poppler
gb.qt4
gb.qt4.ext
gb.qt4.opengl
gb.qt4.webkit
gb.qt4.webview
gb.qt5
gb.qt5.ext
gb.qt5.opengl
gb.qt5.webkit
gb.qt5.webview
gb.qt6
gb.qt6.ext
gb.qt6.opengl
gb.qt6.webview
gb.report
gb.report2
gb.scanner
gb.sdl
gb.sdl.sound
gb.sdl2
gb.sdl2.audio
gb.settings
gb.signal
gb.term
gb.test
gb.util
gb.util.web
gb.v4l
gb.vb
gb.web
gb.web.feed
gb.web.form
gb.web.gui
gb.xml
gb.xml.html
gb.xml.rpc
gb.xml.xslt
Controls pictures
Deprecated components
Developer Documentation
Development Environment Documentation
Documents
Error Messages
Gambas Playground
How To's
Language Index
Language Overviews
Last Changes
Lexicon
README
Search the wiki
To Do
Topics
Tutorials
Wiki License
Wiki Manual

Net (gb.net)

This class provides constant definitions used by the rest of the classes in this component.

Most of them are linked with the Status property of Net classes. In that case:

  • Error values are always negative values.

  • An inactive value is always zero.

  • Activity is reflected with positive values.

You can determine if there was an error, by checking whether the Status property is negative.

This class is static.

Constants
Accepting   This constant shows that a remote client is trying to connect with a server socket, and that the connection is being accepted.
Active   This constant shows that a network object is working at this moment.
CannotAuthenticate   Const CannotAuthenticate As Integer = -16
CannotBindInterface   This error constant means that binding a ServerSocket to a specific interface failed.
CannotBindSocket   This constant reflects that a network socket was unable to use (bind) to a port.
CannotCreateSocket   This constant reflects that a network object was unable to create a new socket, the system did not allow the operation to be performed.
CannotListen   This constant reflects that a server socket was unable to start listening on a TCP port or a local path.
CannotRead   This constant reflects that there was an error when trying to read data from a socket or a serial port.
CannotWrite   This constant shows that there was an error when trying to write data to a socket or a serial port.
Connected   This constant reflects that a socket, acting like a client, is currently connected to a remote server.
Connecting   This constant reflects that a socket, acting like a client, is trying to connect to a remote server.
ConnectionRefused   This constant reflects that a remote server refused a connection from a client socket.
ConnectionTimeout   This constant means that there was a connection timeout.
HostNotFound   This constant reflects that an object from one of the Net classes failed to translate a host name to an IP address.
IPv4   Constant used by Format for IPv4 addresses.
Inactive   This constant reflects that a network object is doing nothing, it is inactive.
Internet   Defines an Internet domain socket.
Local   Defines a local or an Unix domain socket.
Pending   This constant reflects that a remote client is trying to connect with a server socket, and that connection must be accepted or rejected.
ReceivingData   This constant means that some data is being downloaded from the network.
Searching   Reflects that an object from one of the Net classes is trying to translate a host name to an IP address.
Unix   Defines a local or Unix domain socket.

Static methods
Format   Format a string that contains an IP address.