lib/share/network.rb
##
# Converts a integer to single character network string
#
# the base of the network is NET_INT_BASE
# so the number 93 is the last single character number represented as '~'
#
# @param [Integer, #chr] int decimal based number
# @return [String] the int converted to base NET_INT_BASE
Converts a integer to single character network string
the base of the network is NET_INT_BASE
so the number 93 is the last single character number represented as '~'
Converts a integer to single character network string the base of the network is NET_INT_BASE so the number 93 is the last single character number represented as ' ~ '
def net_pack_int(int)
  net_error "#{__method__}: '#{int}' is too low allowed range #{NET_MIN_INT}-#{NET_MAX_INT}" if int < NET_MIN_INT
  net_error "#{__method__}: '#{int}' is too high allowed range #{NET_MIN_INT}-#{NET_MAX_INT}" if int > NET_MAX_INT
  int += NET_INT_OFFSET
  int.chr
end
def net_pack_int ( int ) net_error "#{__method__}: '#{int}' is too low allowed range #{NET_MIN_INT}-#{NET_MAX_INT}" if int < NET_MIN_INT net_error "#{__method__}: '#{int}' is too high allowed range #{NET_MIN_INT}-#{NET_MAX_INT}" if int > NET_MAX_INT int += NET_INT_OFFSET int . chr end
Converts a integer to single character network string
the base of the network is NET_INT_BASE
so the number 93 is the last single character number represented as '~'
Converts a integer to single character network string the base of the network is NET_INT_BASE so the number 93 is the last single character number represented as ' ~ '
the int converted to base NET_INT_BASE
the int converted to base NET_INT_BASE
String
int
<not_specific>
<not_specific>
int decimal based number
int decimal based number