is channel can be opened on any tcp port ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

is channel can be opened on any tcp port ?

Ni Va
Hi,


I would like to know if we can use channel opening example on any server.

For example this one : http://snap7.sourceforge.net/snap7_server.html
There is a demoserver which uses tcp port 102.

Thank you
NiVa

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: is channel can be opened on any tcp port ?

Bram Moolenaar

> I would like to know if we can use channel opening example on any server.
>
> For example this one : http://snap7.sourceforge.net/snap7_server.html
> There is a demoserver which uses tcp port 102.

Yes, that should work.

--
Why isn't there mouse-flavored cat food?

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: is channel can be opened on any tcp port ?

Ni Va
Le dimanche 3 février 2019 13:13:52 UTC+1, Bram Moolenaar a écrit :

> > I would like to know if we can use channel opening example on any server.
> >
> > For example this one : http://snap7.sourceforge.net/snap7_server.html
> > There is a demoserver which uses tcp port 102.
>
> Yes, that should work.
>
> --
> Why isn't there mouse-flavored cat food?
>
>  /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
> ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
> \\\  an exciting new programming language -- http://www.Zimbu.org        ///
>  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
Yes it works Fine. Thank you!


let s:destination="localhost:102"

func! testing#Handle(channel, msg)
  echo 'Received: ' . a:msg
endfunc

fun! testing#Connect() "{{{
  let g:channel = ch_open(s:destination, {"callback": "Handle", "mode": "raw", "waittime":"800"})
  if ch_status(g:channel) == "open"
        echo "channel in use"
  else
        echo "channel fails"
  endif
endfunction "}}}

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.