Skip to content

Commit

Permalink
Update comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
jichu4n committed Jul 4, 2024
1 parent 2d0e9c5 commit 793830a
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/sync-servers/network-sync-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import {TcpSyncServer} from './tcp-sync-server';
/** HotSync port to listen on. */
export const NET_SYNC_PORT = 14238;

/** Network HotSync server. */
/** Sync server for network HotSync connections.
*
* Only available in Node.js.
*/
export class NetworkSyncServer extends TcpSyncServer<NetSyncConnection> {
connectionType = NetSyncConnection;
port = NET_SYNC_PORT;
Expand Down
6 changes: 5 additions & 1 deletion src/sync-servers/serial-over-network-sync-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ import {TcpSyncServer} from './tcp-sync-server';
*/
export const SERIAL_NETWORK_SYNC_PORT = 6416;

/** Serial-over-network HotSync server for use with Palm OS emulators. */
/** Sync server for serial-over-network connections, primarily for use with Palm
* OS emulators such as POSE.
*
* Only available in Node.js.
*/
export class SerialOverNetworkSyncServer extends TcpSyncServer<SerialSyncConnection> {
connectionType = SerialSyncConnection;
port = SERIAL_NETWORK_SYNC_PORT;
Expand Down
5 changes: 4 additions & 1 deletion src/sync-servers/serial-sync-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import {
} from '../protocols/sync-connections';
import {SyncFn, SyncServer} from './sync-server';

/** Sync server using a serial port. */
/** Sync server for serial connections.
*
* Only available in Node.js.
*/
export class SerialSyncServer extends SyncServer {
constructor(
/** Serial port device to listen on. */
Expand Down
2 changes: 1 addition & 1 deletion src/sync-servers/tcp-sync-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import {Duplex} from 'stream';
import {SyncServer} from './sync-server';

/** Base class sync servers that communicate over TCP/IP. */
/** Base class for sync servers that communicate over TCP/IP. */
export abstract class TcpSyncServer<
SyncConnectionT extends SyncConnection,
> extends SyncServer {
Expand Down
4 changes: 4 additions & 0 deletions src/sync-servers/usb-sync-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,10 @@ export class UsbConnectionStream extends Duplex {
/** USB device polling interval used in waitForDevice(). */
const USB_DEVICE_POLLING_INTERVAL_MS = 200;

/** Sync server for USB connections.
*
* Available both in Node.js and the browser.
*/
export class UsbSyncServer extends SyncServer {
override async start() {
if (this.runPromise) {
Expand Down
4 changes: 4 additions & 0 deletions src/sync-servers/web-serial-sync-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ export class WebSerialStream extends Duplex {
private shouldClose = false;
}

/** Sync server for Web Serial API connections.
*
* Only available in the browser.
*/
export class WebSerialSyncServer extends SyncServer {
constructor(
/** HotSync logic to run when a connection is made. */
Expand Down

0 comments on commit 793830a

Please sign in to comment.