Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 905
Default How to write networking code in VBA?

I am quite familiar with BSD networking API. But I don't know the first
thing about network programming in VBA. I've done a Google search, and I
will continue to do so. But so far, I have not found a concrete example
(that I can access). I would very much appreciate some hand-holding.

Here is what I want to do in a macro. It's really very rudimentary.

on error goto done
connect(TCP) to ipAddress:portNumber
for each line (read from a file or otherwise provided by the macro)
send line (terminated by \r\n on the wire)
recv response (one line terminated by \r\n on the wire)
next
done:
on error goto 0
close connection

One issue.... TCP itself is not message (line) oriented. A remote system
might transmit a line (response) in multiple TCP packets. Ideally, I would
like the VBA "recv response" to be line-oriented. If there is an option to
enable that behavior, I would like to know how to do that.

One complication.... I might need to know how to start and stop a timer
before each network call. At least in UNIX, that would cause the call to
terminate with an error. Alternative, I would like to know how to enable
TCP keepalives, or that they are enabled by default.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Networking by VBA Li Jianyong Excel Programming 3 December 1st 08 04:54 PM
NETWORKING DATABASE Raja Excel Discussion (Misc queries) 1 December 26th 07 09:35 AM
networking choice[_2_] Excel Programming 1 July 2nd 05 11:28 PM
Scripting.FileSystemObject Networking Mirom Excel Programming 0 November 30th 03 04:18 AM
Networking problems... Rob Oostveen Excel Programming 1 August 26th 03 06:09 PM


All times are GMT +1. The time now is 11:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"