Thank you for your question.
Channels are much more than a peer-to-peer connection.
Yes, you can put tokens from your balance to the channel. You will be able to do it in a various ways - via a transaction or a contract for example. This will reduce your balance and the tokens will become part of the channel’s balance.
Once the channel is created - a
uniq_channel_hash_id is created for it. You can think of it as the channel’s address. From then on, you are to use it in both your on-chain and off-chain transactions regarding this channel. Ex.:
The channel is a first class object in AE, so you have a couple of different on-chain transaction types that referrence the channel (by its
uniq_channel_hash_id): you can deposit tokens to it, withdraw tokens from it, snapshot it, and close it in a various ways.
Off-chain you can transfer tokens to and from the other party, you can both call contracts and etc.
These all have the
uniq_channel_hash_id involved, treating it as an independent on-chain entity (which it actually is). From the chain’s point of view the channel is a mutly-party account that has its own special rules for operations and distinct transaction types.
Now regarding WebSockets - channels have 2 parts:
- Protocol for creating, updating and closing channels on-chain. Those are the expected transactions in order for one to operate a channel on-chain and enjoy its strong dispute resolution capabilities.
- Various implementations of channels that comply with the bullet point above. These might or might not be based on WebSockets. The important thing is that you can sign a correct offchain transaction, the medium used is not enforced in any way. You could do it even on a piece of paper Our implementation for channels does use encrypted WebSockets but this is not a requirement, you can use a channel implementation of your own.
If you have further questions, I remain at your disposal.