ScyllaDB University Live | Free Virtual Training Event
Learn more
ScyllaDB Documentation Logo Documentation
  • Deployments
    • Cloud
    • Server
  • Tools
    • ScyllaDB Manager
    • ScyllaDB Monitoring Stack
    • ScyllaDB Operator
  • Drivers
    • CQL Drivers
    • DynamoDB Drivers
    • Supported Driver Versions
  • Resources
    • ScyllaDB University
    • Community Forum
    • Tutorials
Install
Search Ask AI
ScyllaDB Docs ScyllaDB Node.js Driver API Reference Modules types InetAddress
For AI agents: a documentation index is available at https://nodejs-rs-driver.docs.scylladb.com/main/llms.txt. A Markdown version of this page is at https://nodejs-rs-driver.docs.scylladb.com/main/api/types/InetAddress.md.

Caution

You're viewing documentation for an unstable version of ScyllaDB Node.js Driver. Switch to the latest stable version.

InetAddress¶

types~InetAddress(buffer)

Represents an IP address.

Constructor¶

new InetAddress(buffer)

Creates an instance of InetAddress.

Parameters:
Name Type Description
buffer

The buffer containing the IPv4 or IPv6 address.

Source

types/inet-address.ts, line 8

Throws:

If the buffer is not a valid IPv4 or IPv6 address.

Members¶

(readonly) buffer

Immutable buffer that represents the IP address

Source

types/inet-address.ts, line 60

(readonly) length

Returns the length of the underlying buffer

Source

types/inet-address.ts, line 36

(readonly) version

Returns the Ip version (4 or 6)

Source

types/inet-address.ts, line 48

Methods¶

()

Validates for a IPv4-Mapped IPv6 according to https://tools.ietf.org/html/rfc4291#section-2.5.5

Source

types/inet-address.ts, line 253

equals()

Compares 2 addresses and returns true if the underlying bytes are the same

Source

types/inet-address.ts, line 146

getBuffer()

Returns the underlying buffer

Source

types/inet-address.ts, line 159

inspect()

Provide the name of the constructor and the string representation

Source

types/inet-address.ts, line 166

toJSON()

Returns the string representation. Method used by the native JSON.stringify() to serialize this instance.

Source

types/inet-address.ts, line 246

toString()

Returns the string representation of the IP address.

For v4 IP addresses, a string in the form of d.d.d.d is returned.

For v6 IP addresses, a string in the form of x:x:x:x:x:x:x:x is returned, where the 'x's are the hexadecimal values of the eight 16-bit pieces of the address, according to rfc5952. In cases where there is more than one field of only zeros, it can be shortened. For example, 2001:0db8:0:0:0:1:0:1 will be expressed as 2001:0db8::1:0:1.

Source

types/inet-address.ts, line 180

(static) fromString(value)

Converts a string representation of an IP address to an InetAddress instance.

This function accepts both IPv4 and IPv6 addresses, which may include an embedded IPv4 address.

Parameters:
Name Type Description
value

Source

types/inet-address.ts, line 77

Throws:
  • If the input string is not a valid IPv4 or IPv6 address.
Type
TypeError

Was this page helpful?

PREVIOUS
Duration
NEXT
Integer
  • Create an issue
  • Edit this page

On this page

  • InetAddress
    • Constructor
    • Members
    • Methods
ScyllaDB Node.js Driver
Search Ask AI
  • main
    • main
    • v0.6.1
  • Getting Started
  • Statements
    • Executing CQL Statements - Best Practices
    • Unprepared Statements
    • Batch Statements
    • Parameterized queries
  • Fetching Large Result Sets
  • Logging
  • Policies
    • Load Balancing
    • Retry Policies
  • Authentication
  • Shutdown
  • Migration Guide
  • API Reference
    • Modules
      • auth
        • AuthProvider
        • Authenticator
        • PlainTextAuthProvider
      • concurrent
      • datastax
        • graph
        • search
      • errors
        • ArgumentError
        • AuthenticationError
        • BusyConnectionError
        • DriverInternalError
        • NoHostAvailableError
        • NotSupportedError
        • OperationTimedOutError
        • ResponseError
      • geometry
      • mapping
        • DefaultTableMappings
        • Mapper
        • ModelBatchItem
        • ModelMapper
        • Result
        • UnderscoreCqlToCamelCaseMappings
        • TableMappings
      • metadata
        • Aggregate
        • ClientState
        • ColumnMetadata
        • Index
        • KeyspaceMetadata
        • MaterializedView
        • Metadata
        • SchemaFunction
        • Strategy
        • TableMetadata
        • Udt
        • UdtField
      • metrics
        • DefaultMetrics
        • ClientMetrics
      • policies
        • addressResolution
          • AddressTranslator
          • EC2MultiRegionTranslator
          • MappingAddressTranslator
        • loadBalancing
          • AllowListPolicy
          • DCAwareRoundRobinPolicy
          • DefaultLoadBalancingPolicy
          • LegacyDefaultLoadBalancingPolicy
          • LoadBalancingConfig
          • LoadBalancingPolicy
          • RoundRobinPolicy
          • TokenAwarePolicy
        • reconnection
          • ConstantReconnectionPolicy
          • ExponentialReconnectionPolicy
          • ReconnectionPolicy
        • retry
          • FallthroughRetryPolicy
          • RetryPolicy
        • speculativeExecution
          • ConstantSpeculativeExecutionPolicy
          • NoSpeculativeExecutionPolicy
          • SpeculativeExecutionPolicy
        • timestampGeneration
          • MonotonicTimestampGenerator
          • TimestampGenerator
      • tracker
        • RequestLogger
        • RequestTracker
      • types
        • BigDecimal
        • Duration
        • InetAddress
        • Integer
        • LocalDate
        • Long
        • ResultSet
        • ResultStream
        • Row
        • TimeUuid
        • Tuple
        • Uuid
        • Vector
    • Classes
      • AddressResolver
      • ByteOrderedToken
      • Client
      • ColumnInfo
      • DateRange
      • DateRangeBound
      • DseGssapiAuthProvider
      • DsePlainTextAuthProvider
      • Edge
      • Element
      • Encoder
      • EncoderMembers
      • ExecutionOptions
      • ExecutionProfile
      • FrameReader
      • GraphResultSet
      • HashSet
      • LineString
      • Murmur3Token
      • Path
      • Point
      • Polygon
      • Property
      • RandomToken
      • SslOptions
      • Token
      • TokenRange
      • Vertex
      • VertexProperty
    • Interfaces
    • Events
    • Global Functions and Constants
Docs Tutorials University Contact Us About Us
© 2026 ScyllaDB | Terms of Service | Privacy Policy | ScyllaDB, and ScyllaDB Cloud, are registered trademarks of ScyllaDB, Inc.
Last updated on 10 Aug 2026.
Powered by Sphinx 9.1.0 & ScyllaDB Theme 1.9.3