---
name: "Net::Jabber::Loudmouth::Connection"
section: "3pm"
platform: "linux"
package: "libnet-jabber-loudmouth-perl"
version: "0.07-4+b4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Net::Jabber::Loudmouth::Connection"
---

# Net::Jabber::Loudmouth::Connection(3pm)

Jabber connection

## NAME

Net::Jabber::Loudmouth::Connection -  Jabber connection

## HIERARCHY

```
  Glib::Boxed
  +----Net::Jabber::Loudmouth::Connection
```

## METHODS

### connection = Net::Jabber::Loudmouth::Connection-\>new ($server)

- •

  `$server` (string)

### connection = Net::Jabber::Loudmouth::Connection-\>new\_with\_context ($server, $context)

- •

  `$server` (string)

- •

  `$context` (Glib::MainContext thingamabob)

### boolean = $connection-\>authenticate ($username, $password, $resource, $auth\_cb, $user\_data=undef)

- •

  `$username` (string)

- •

  `$password` (string)

- •

  `$resource` (string)

- •

  `$auth_cb` (scalar)

- •

  `$user_data` (scalar)

### boolean = $connection-\>authenticate\_and\_block ($username, $password, $resource)

- •

  `$username` (string)

- •

  `$password` (string)

- •

  `$resource` (string)

### $connection-\>cancel\_open

### boolean = $connection-\>close

### $connection-\>set\_disconnect\_function ($disconnect\_cb, $user\_data=undef)

- •

  `$disconnect_cb` (scalar)

- •

  `$user_data` (scalar)

### boolean = $connection-\>is\_authenticated

### boolean = $connection-\>is\_open

### string = $connection-\>get\_jid

### $connection-\>set\_jid ($jid)

- •

  `$jid` (string)

### $connection-\>set\_keep\_alive\_rate ($rate)

- •

  `$rate` (integer)

### boolean = $connection-\>open ($result\_cb, $user\_data=undef)

- •

  `$result_cb` (scalar)

- •

  `$user_data` (scalar)

### boolean = $connection-\>open\_and\_block

### integer = $connection-\>get\_port

### $connection-\>set\_port ($port)

- •

  `$port` (integer)

### proxy = $connection-\>get\_proxy

### $connection-\>set\_proxy ($proxy)

- •

  `$proxy` (Net::Jabber::Loudmouth::Proxy or undef)

### messagehandler = $connection-\>register\_message\_handler ($type, $priority, $handler\_cb, $user\_data=undef)

- •

  `$type` (Net::Jabber::Loudmouth::MessageType)

- •

  `$priority` (Net::Jabber::Loudmouth::HandlerPriority)

- •

  `$handler_cb` (scalar)

- •

  `$user_data` (scalar)

### boolean = $connection-\>send ($message)

- •

  `$message` (Net::Jabber::Loudmouth::Message)

### boolean = $connection-\>send\_raw ($str)

- •

  `$str` (string)

### boolean = $connection-\>send\_with\_reply ($message, $handler)

- •

  `$message` (Net::Jabber::Loudmouth::Message)

- •

  `$handler` (Net::Jabber::Loudmouth::MessageHandler)

### message = $connection-\>send\_with\_reply\_and\_block ($message)

- •

  `$message` (Net::Jabber::Loudmouth::Message)

### string = $connection-\>get\_server

### $connection-\>set\_server ($server)

- •

  `$server` (string)

### ssl = $connection-\>get\_ssl

### $connection-\>set\_ssl ($ssl)

- •

  `$ssl` (Net::Jabber::Loudmouth::SSL or undef)

### connectionstate = $connection-\>get\_state

### $connection-\>unregister\_message\_handler ($type, $handler)

- •

  `$type` (Net::Jabber::Loudmouth::MessageType)

- •

  `$handler` (Net::Jabber::Loudmouth::MessageHandler)

## ENUMS AND FLAGS

### enum Net::Jabber::Loudmouth::ConnectionState

- •

  'closed' / 'LM\_CONNECTION\_STATE\_CLOSED'

- •

  'opening' / 'LM\_CONNECTION\_STATE\_OPENING'

- •

  'open' / 'LM\_CONNECTION\_STATE\_OPEN'

- •

  'authenticating' / 'LM\_CONNECTION\_STATE\_AUTHENTICATING'

- •

  'authenticated' / 'LM\_CONNECTION\_STATE\_AUTHENTICATED'

### enum Net::Jabber::Loudmouth::HandlerPriority

- •

  'last' / 'LM\_HANDLER\_PRIORITY\_LAST'

- •

  'normal' / 'LM\_HANDLER\_PRIORITY\_NORMAL'

- •

  'first' / 'LM\_HANDLER\_PRIORITY\_FIRST'

### enum Net::Jabber::Loudmouth::MessageType

- •

  'message' / 'LM\_MESSAGE\_TYPE\_MESSAGE'

- •

  'presence' / 'LM\_MESSAGE\_TYPE\_PRESENCE'

- •

  'iq' / 'LM\_MESSAGE\_TYPE\_IQ'

- •

  'stream' / 'LM\_MESSAGE\_TYPE\_STREAM'

- •

  'stream-error' / 'LM\_MESSAGE\_TYPE\_STREAM\_ERROR'

- •

  'stream-features' / 'LM\_MESSAGE\_TYPE\_STREAM\_FEATURES'

- •

  'auth' / 'LM\_MESSAGE\_TYPE\_AUTH'

- •

  'challenge' / 'LM\_MESSAGE\_TYPE\_CHALLENGE'

- •

  'response' / 'LM\_MESSAGE\_TYPE\_RESPONSE'

- •

  'success' / 'LM\_MESSAGE\_TYPE\_SUCCESS'

- •

  'failure' / 'LM\_MESSAGE\_TYPE\_FAILURE'

- •

  'proceed' / 'LM\_MESSAGE\_TYPE\_PROCEED'

- •

  'starttls' / 'LM\_MESSAGE\_TYPE\_STARTTLS'

- •

  'unknown' / 'LM\_MESSAGE\_TYPE\_UNKNOWN'

## SEE ALSO

Net::Jabber::Loudmouth, Glib::Boxed

## COPYRIGHT

Copyright (C) 2005 by Florian Ragwitz

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.
