Class: Crusade::APNS::SocketConnection

Inherits:
Object
  • Object
show all
Defined in:
lib/crusade/apns/socket_connection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configuration) ⇒ SocketConnection

Returns a new instance of SocketConnection.



6
7
8
9
10
11
# File 'lib/crusade/apns/socket_connection.rb', line 6

def initialize(configuration)
  self.configuration = configuration

  self.host = 'gateway.push.apple.com'
  self.port = 2195
end

Instance Attribute Details

#hostObject

Returns the value of attribute host.



4
5
6
# File 'lib/crusade/apns/socket_connection.rb', line 4

def host
  @host
end

#portObject

Returns the value of attribute port.



4
5
6
# File 'lib/crusade/apns/socket_connection.rb', line 4

def port
  @port
end

Instance Method Details

#send(data) ⇒ Object



13
14
15
# File 'lib/crusade/apns/socket_connection.rb', line 13

def send data
  write data
end