Swoole\Client::connect

(PECL swoole >= 1.9.0)

Swoole\Client::connectConnect to the remote TCP or UDP port.

Beschreibung

public Swoole\Client::connect(
    string $host,
    int $port = ?,
    int $timeout = ?,
    int $flag = ?
): bool

Parameter-Liste

host

The host name of the remote address.

port

The port number of the remote address.

timeout

The timeout(second) of connect/send/recv, the dafault value is 0.1s

flag

If the type of client is UDP, the $flag means if to enable the configuration udp_connect. If the configuration udp_connect is enabled, the client will only receive the data from specified ip:port. If the type of client is TCP and the $flag is set to 1, it must use swoole_client_select to check the connection status before send/recv.

Rückgabewerte

Whether the connection is established.

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

Was genau bedeutet "Vibe Coding"? Ein tiefgehender Blick für Entwickler

In der Welt der Softwareentwicklung gibt es unzählige Wege, wie man an ein Projekt herangeht. Manche schwören auf strikte Planung, andere auf bewährte Algorithmen und wieder andere lassen sich von etwas ganz anderem leiten: ihrem Gefühl. ...

admin

Autor : admin
Kategorie: Software & Web-Development

PHP cURL-Tutorial: Verwendung von cURL zum Durchführen von HTTP-Anfragen

cURL ist eine leistungsstarke PHP-Erweiterung, die es Ihnen ermöglicht, mit verschiedenen Servern über verschiedene Protokolle wie HTTP, HTTPS, FTP und mehr zu kommunizieren. ...

TheMax

Autor : TheMax
Kategorie: PHP-Tutorials

Midjourney Tutorial - Anleitung für Anfänger

Über Midjourney, dem Tool zur Erstellung digitaler Bilder mithilfe von künstlicher Intelligenz, gibt es ein informatives Video mit dem Titel "Midjourney Tutorial auf Deutsch - Anleitung für Anfänger" ...

Mike94

Autor : Mike94
Kategorie: KI Tutorials

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

game

The cost of specification inconsistency or supply delays in a residential development context compounds into programme delays and finishing qualit ...

Geschrieben von ken650026 am 25.05.2026 14:30:54
Forum: Off-Topic Diskussionen
game

I'm a UK property developer working on a residential scheme and I need a reliable window film supplier that can support a project at scale with co ...

Geschrieben von meoowu77 am 25.05.2026 14:30:32
Forum: Off-Topic Diskussionen
selling clonecards dumps track1&2 wu transfer!!!

Hi every customer,I have shop CVV, CC and site tool shop and other stuff. - I'm a big hacker ===> Welcome all of you to my service. ===> I have my ...

Geschrieben von lokao am 25.05.2026 13:03:48
Forum: Out of Order
selling clonecards dumps track1&2 wu transfer!!!

Hi every customer,I have shop CVV, CC and site tool shop and other stuff. - I'm a big hacker ===> Welcome all of you to my service. ===> I have my ...

Geschrieben von lokao am 25.05.2026 13:00:13
Forum: User stellen sich vor