node-osc 11.2.3 → 11.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -73,7 +73,35 @@ declare class Server extends EventEmitter<any> {
73
73
  constructor(port: number, host?: string, cb?: Function);
74
74
  port: number;
75
75
  host: string;
76
+ _isListening: boolean;
77
+ _isClosed: boolean;
76
78
  _sock: import("node:dgram").Socket;
79
+ /**
80
+ * Send an OSC message or bundle from the server's bound socket.
81
+ *
82
+ * This method can be used with either a callback or as a Promise.
83
+ *
84
+ * @param {import('./Message.mjs').default|import('./Bundle.mjs').default|Array|string} message - The message, bundle, address, or array to send.
85
+ * @param {number} port - The remote port to send to.
86
+ * @param {string} host - The remote host to send to.
87
+ * @param {Function} [cb] - Optional callback function called when send completes.
88
+ * @returns {Promise<void>|undefined} Returns a Promise if no callback is provided.
89
+ *
90
+ * @throws {Error} If the server socket is not yet listening.
91
+ * @throws {TypeError} If the message format is invalid.
92
+ * @throws {ReferenceError} If attempting to send on a closed socket.
93
+ *
94
+ * @example
95
+ * // Send an address-only message
96
+ * await server.send('/ping', 9000, '127.0.0.1');
97
+ *
98
+ * @example
99
+ * // Send an array message
100
+ * server.send(['/ack', 1], 9000, '192.168.1.42', (err) => {
101
+ * if (err) console.error(err);
102
+ * });
103
+ */
104
+ send(message: import("./Message.mjs").default | import("./Bundle.mjs").default | any[] | string, port: number, host: string, cb?: Function): Promise<void> | undefined;
77
105
  /**
78
106
  * Close the server socket.
79
107
  *
@@ -1 +1 @@
1
- {"version":3,"file":"Server.d.mts","sourceRoot":"","sources":["../lib/Server.mjs"],"names":[],"mappings":";AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH;IACE;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,kBApBW,MAAM,SACN,MAAM,iBAgEhB;IArCC,aAAgB;IAChB,aAAgB;IAChB,mCAGE;IAiCJ;;;;;;;;;;;;;;;;;OAiBG;IACH,sBAZa,OAAO,CAAC,IAAI,CAAC,GAAC,SAAS,CAuBnC;CACF;6BAvJ4B,aAAa"}
1
+ {"version":3,"file":"Server.d.mts","sourceRoot":"","sources":["../lib/Server.mjs"],"names":[],"mappings":";AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH;IACE;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,kBApBW,MAAM,SACN,MAAM,iBAyEhB;IA9CC,aAAgB;IAChB,aAAgB;IAChB,sBAAyB;IACzB,mBAAsB;IACtB,mCAGE;IAwCJ;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,cApBW,OAAO,eAAe,EAAE,OAAO,GAAC,OAAO,cAAc,EAAE,OAAO,WAAO,MAAM,QAC3E,MAAM,QACN,MAAM,kBAEJ,OAAO,CAAC,IAAI,CAAC,GAAC,SAAS,CAyCnC;IACD;;;;;;;;;;;;;;;;;OAiBG;IACH,sBAZa,OAAO,CAAC,IAAI,CAAC,GAAC,SAAS,CAuBnC;CACF;6BAxN4B,aAAa"}
@@ -0,0 +1,3 @@
1
+ export default performSend;
2
+ declare function performSend(sock: any, message: any, args: any, port: any, host: any, callback: any): void;
3
+ //# sourceMappingURL=send.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send.d.mts","sourceRoot":"","sources":["../../lib/internal/send.mjs"],"names":[],"mappings":";AAcA,4GA6BC"}