WO1998022882A1 - Smart internet information delivery system - Google Patents
Smart internet information delivery system Download PDFInfo
- Publication number
- WO1998022882A1 WO1998022882A1 PCT/US1997/021520 US9721520W WO9822882A1 WO 1998022882 A1 WO1998022882 A1 WO 1998022882A1 US 9721520 W US9721520 W US 9721520W WO 9822882 A1 WO9822882 A1 WO 9822882A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- return
- void
- information
- server
- idf
- Prior art date
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
- H04L67/61—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources taking into account QoS or priority requirements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
- H04L67/62—Establishing a time schedule for servicing the requests
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/40—Network security protocols
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/30—Definitions, standards or architectural aspects of layered protocol stacks
- H04L69/32—Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
- H04L69/322—Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
- H04L69/329—Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the application layer [OSI layer 7]
Abstract
A Smart delivery system is provided for transmitting video, audio, hyper-text and web documents to end users via the internet over telephone lines, fiber optics, satellite links, or other direct communications on a non-realtime discontinuous basis in which the server (44) providing the information periodically ascertains whether the end user terminal (16) is busy. If so, the transmission to the end user is terminated and the information is stored until such time as the 'busy' indication is terminated. The indication for the end user of incoming information is in the form of an icon (18) generated on-screen on which the user can click to obtain the sought-after information.
Description
TITLE OF INVENTION SMART INTERNET INFORMATION DELIVERY SYSTEM
FIELD OF INVENTION
This invention relates to transmission of information
over the internet or like network and more particularly to a system for providing end users with video, audio, hyper-text, and web concent on a periodic basis based on the ability of tne terminal at the end user to accept and display the
information.
BACKGROUND OF THE INVENTION
Transmission technology exists which allows a content
provider to send information including video, audio, hyper¬ text and web documents to end users over telephone lines, tnrough fiber optics, through satellite transmissions or tnrough other direct connections. Such content including
documents, program material, advertising, etc. has, m the past, been provided on a realtime basis m which an end user is denied access to the information if an application is running on his/her corresponding terminal. Moreover, another impediment to realtime information transfer is network, bandwidth which severely limits the ability to transmit
realtime data. This is especially true of full-frame video, as well as JPEG pictures.
The above makes exceedingly difficult the task of providing advertising, motion pictures, or other information- dense data to subscribers who seek it. Even if the data were available, there is presently no system for accessing this data by the end user unless the user endlessly clicks through folders and windows, which requires the end users to execute many "pull" operations, such as opening a web browser, selecting a command, etc. in order to pull up the required information.
The problems with such transmission technology centers around the limited capacity or volume of the network to transmit information which can be practically delivered to end users due to the infrastructure surrounding the net, such as CPU speed and network throughput. The result is that for entities to provide information to individual users an a requested basis, the information is not as easily accessible as changing the channels on a television. The reason, unlike the television scenario in which the only constraint is the time of the program such as news, drama, etc., is that end users on the network must be made aware of the arrival and location of data to be able to access it. Moreover, this
must be done on a system which is bandwidth-limited and overloaded with applications that are running at the end user ' s terminal .
Thus, the problem of providing realtime on-line access to information from a provider is that if an application is running on the user's terminal, it is difficult to hold the information coming from the server, much less to provide the user with notice of the arrival of information and it's contents at a glance.
Thus, the problem with a realtime system includes the difficulty of a subscriber expecting certain information to be able to have the information at his/her fingertips without getting out of the particular application running on his/her computer to await the arrival of the data.
Moreover, while indications of incoming data have been provided m the past, there was no way for the user to be able to select which data he/she wishes to access other than by a cumbersome process of accessing window after window until the sought-after information becomes available.
SUMMARY OF THE INVENTION Rather than providing a realtime or continuous transmission of information to network users, in the subject
invention the system ascertains whether or not the intended recipient's computer is busy or not. In one embodiment, the server periodically checks the "busyness" of the network and the end user's terminal prior to transmitting stored information to this user. Thereafter, the server immediately after ascertaining that the network subscriber is capable of receiving the messages, sends out the message to the particular network address.
At the same time, the subject invention provides a change m the methodology of transmitting information by indicating that the information which has been subscribed to is available through the utilization of an on-screen icon. What this means to the end user is that rather than having to click through numerous windows to obtain the information for which he/she has subscribed, m the subject invention all that is necessary is to click on the appropriate icon on the screen, at which time the information from the server which has been locally stored is opened and presented to the user, thereby providing an ease of access to the information heretofore not possible.
The subject invention therefore ensures to information providers that they will not have any bandwidth limitations imposed on them. Thus, there are theoretically no
limitations related to information capacity or volume of the system m order to provide the information to the subscribers .
The information required can take as much time as a week
to be provided to local storage, and can be provided at such times as the user's terminal is not busy. By sending information only when the user terminal is not busy, there is
no limitation on the amount of information that can be provided and stored locally.
Information providers can therefore provide a service such as renting videos through the internet, selling CD music
through the internet, and providing information which is recordable on CDs by recording and playback devices at the user's terminal. Moreover, information providers can sell
daily news as an electronic package and can provide audio/video/document advertising or catalogs to be delivered
at off peak hours when applications are not running on the subscriber's computers.
End users can easily identify the arrival of information and data and watch it by simply double-clicking the icon
provided on the screen. The subject system therefore
provides exceptionally easy operation for the accessing of subscribed- for information which increases the number of
users and provides TV-like entertainment on demand through the subject non-realtime process.
In summary, advertisement and program material can be announced through the utilization of on-screen icons which are always presented on-screen and not in folders. The smart delivery technology is non-realtime so as to be able to locally store only those ads or program material the subscriber wants to see, followed by the delivery of the material with full frame video and audio. As will be appreciated, the information provider can provide an icon along with information to permit direct access by the user.
In one embodiment, a specialized algorithm is provided for ascertaining whether or not the user's CPU is busy. The system is divided between the client side and the server side, with the client side maintaining a count representing the time that the CPU is occupied by applications running at the client side. This is done over a period such as five seconds to generate a number reflecting "user state", plus Kernel state, plus Context switches, thus to derive a value m terms of x mscc/5 sec. This value is compared with criteria indicating if the CPU is too busy. If so, a signal is provided over the net to stop transmitting data, with a hold signal being provided to the server side to interrupt
any information being provided to the particular user.
The subject system also keeps track of the network occupation during the same preceding five seconds, with network occupation being a function of the data transmitted m terms of kilobytes for the last five seconds. This second number is compared with a second criteria utilized to indicate full occupation of the network if the network occupation is above a predetermined level, a hold signal is sent from the client side to the server side. If the second number is less than that indicating full occupation, file transfer is slowed or stopped so as to not interfere with other running applications or data transfers.
In summary, if interference is sensed, then the second hold signal is provided to the server side to wait for a send mode signal which is generated from the client side and transmitted to the server side to send the remaining data. Thereafter, an end-of-data signal is transmitted from the server side to the client side. After receipt of the end of- data signal, the client side transmits a "data transfer complete" signal to the server side indicating that the icon for the transmitted information exists on-screen at the client screen. Thus, at the point that the on-screen icon exists at the client side there is an indication sent to the
server side of the receipt of data at the client side and
that the information is stored locally at the client side.
Put another way, the server links the network to the
screen of the user's terminal and places the icon on the screen indicating to the user that the message has been
delivered and is locally stored, simultaneously indicating
the existence of a message. The icon can be placed on the screen even after being held, for instance, until a specific day such as a birthday.
BRIEF DESCRIPTIONS OF THE DRAWINGS These and other features of the subject invention will be better understood taken m conjunction with the Detailed Description m conjunction with the Drawings of which;
Figure 1 is a block diagram of the subject system indicating non-realtime transmission of data to an end user's
terminal from a server which checks the network and terminal busy condition m order to inhibit the sending of data until such time as both the terminal and network can accommodate
the transfer;
Figure 2 is a front view of a terminal indicating the provision of an icon by the subject system m which the icon's existence indicates the existence of data from a
server, clicking on the icon providing the end user with the transmitted data;
Figure 3 is a more detailed block diagram of the system of Figure 1 indicating the client side and the server side, with a system for establishing network and terminal busy;
Figure 4 is a diagrammatic illustration of the screen of Figure 3 in which an icon such as that associated with advertising is presented in the lower left corner of the screen;
Figure 5 is a screen shot of a commercial running on the screen of the terminal Figure 3 after having been selected through clicking on the icon of Figure 4 ;
Figure 6 is a diagram of the subject system indicating the utilization of a subscriber system in which a client subscribes to a service which provides requested information or data from a server, followed by authorization and activation, followed by the smart delivery of information based on the system described, in Figures 3, 4, and 5; and,
Figure 7 is a flow chart indicating a system for ascertaining the state of the client side and network as to the busyness of the two.
DETAILED DESCRIPTION
Referring now to Figure 1, in the subject system a provider 10 provides data through non-realtime transmission 12, with a direct indication of the arrival of the information 14 being provided at an end user's screen 16. In this example, the direct indication that information exists from the provider is provided by icon 18.
The non-realtime transmission, as mentioned before, permits full -frame video, JPEG and MPEG transmissions, and in fact, any other information-dense transmission to be sent from the provider to the end user at such times as the network and the end user can accommodate the transmission.
This is accomplished in one embodiment through a network/terminal busy detector 20 which both checks the network busyness and the state of the computer at the user's terminal through a unit 22 which periodically checks both the network occupation and the state of the CPU at the client side. Upon sensing a busy condition as illustrated by arrow 24, a hold signal is sent at 26 to inhibit the transmission of the provider's information and to store it at the server, with the remaining information to be sent only when a "not busy" indication 28 is generated. Upon receipt of the "not busy" signal, the information is sent as illustrated at 30,
or at least that portion of the information that has not already been sent. When this information is sent, an "end-
of-data" state is sensed at 32 and if the data is complete, icon 18 on screen 16 is activated as illustrated at 34, indicating to the end user that he is m receipt of information from the provider.
Such an indication is illustrated at Figure 2 which is a screen shot of a typical computer screen, with the existence of icon 18 indicating that data has been sent and is now available to the end user. This is not a realtime system,
but rather one m which the data is stored locally at the
user's CPU to accommodate information-dense transmissions such as full -frame video, audio, and JPEG or other pictures as well as straight textual data.
By merely double clicking on the icon, the end user is then presented with the data from the provider, which data
may be on a subscription or other basis. When the data is provided on a subscription basis, it is only transmitted to
the user upon activation of the system and end user authentication. What this means is that on a subscription
basis, costly data can be securely transmitted and stored locally, with access to the data being by merely double clicking on the icon.
As will be appreciated, what this presents to the user is a simplified system for accessing data which he has paid for or authorized to be sent. No longer must the user click through a number of windows or folders m order to be able to access the data for which he has paid.
More specifically, and referring now to Figure 3, a networK 40 connects provider 42 through its associated server 44 to a terminal 46 driven by local storage 48 and an icon drive 50 under control of signals to and from the server. It will be appreciated that through a system to be described hereinafter terminal 46 can indicate that it is running an application and is therefore busy, or at least too busy to accept incoming messages. This is accomplished through the generation of a busy signal 52 which may be m the form of a hold signal transmitted over the network to server 44 which detects this busy signal along with a signal indicating the degree of network occupation. If an application is running on the client side such as to prevent the inflow of information to the CPU at the client side, or if the network
occupation is too high, then server 44 stores and holds the
content to be transmitted from the provider to the client
until such time as the "busyness" factor drops below a predetermined level. At this time, server 44 transmits
video, audio, hyper-text or other information to local
storage 48 via network 40 so that this information can be accessed at the convenience of the user through the double clicking on the icon.
This double clicking on the icon is illustrated in
Figure to be an icon indicating, for instance, a commercial such as a Bud Light commercial, the icon being indicated at 60. Upon double clicking as by arrow 62 on this icon, the user is presented with the full commercial as illustrated at
64 m Figure 5. What will be appreciated is that the multimedia transmission from the server can be accessed by the end user by a simple button click on an icon provided by the
server and thus the provider. What is eliminated by this system is annoyance of the end user because the network
cannot accommodate the transmission of the data, much less receipt of the data by his/her CPU.
Referring now to Figure 6, one such system for the
authorization and subscription to such a service is illustrated m which the client registers for membership as illustrated at 70, with activation and a preference set being recorded at 72 to provide the active services 74. This is
accomplished by the customer 76 providing a registration card
and telephone number to the provider, in this case, company
78, which in turn mails a membership software disk 80 back to customer 76.
Upon receipt of the software disk, the customer loads the software in an activation step as illustrated at 82 which
provides the information back to company 78. The company then provides a confirmation notice 80 back to customer 76 to confirm an active connection, an IP address and modem option
set for the interactive communication between the customer and the provider.
Thereafter, company 78, through its server provides the information and active services requested as illustrated at 82 with the delivery being a so-called smart delivery in that it is provided to the customer locally and stored only when
the customer is ready to receive the information. Its existence is also indicated to the user by an on-screen icon which remains on the customer's screen upon booting of his/her system.
When the customer seeks to download or read out this information, the customer merely clicks on the icon which
results in the presentation of the associated information. Simultaneously, and for billing purposes a signal is sent
back to the company as illustrated at 84 to charge the customer for the services that he/she has requested.
Referring now to Figure 7, one type of system for
ascertaining the "busyness" of both the terminal and the network is illustrated. Here, on the client side as illustrated at 90 the CPU occupation time of the software running is counted during the preceding five seconds and a
number is developed reflective of user state, plus Kernel state, plus Context switches. This is compared at 92 with criteria indicating a reasonable occupation or threshold, at which time the server is provided with a signal at 94 to indicated that the terminal and the CPU associated therewith is busy. This is a hold signal 96 which is sent over the network to the server side at 98 to request a hold mode m which the information to be sent is inhibited at 100 until such time as the hold mode signal is extinguished or deleted.
Additionally, on the client side, network occupation is
also sensed at 102 which counts the number of bits and incoming data and compares it at 104 with a preset criteria indicating network occupation. When the network is too busy
to accommodate the incoming transmission, a second hold signal is generated at 106 to hold the transmission at 108. At this time, a second hold operation at 110 is transmitted
back to unit 100 to prevent the transmission of the information. Assuming both of the criteria mentioned above
are met, a send signal is transmitted at 112 to the server side which is received at 114 to instruct unit 100 to send either all of the original data or that portion of the data which has not previously been sent. After the client side
has received the data, there is a link to the screen which presents an icon indicating receipt of information at the client side, with the client side then sending a "message- complete" signal at 116 over line 118 back to unit 114 to
indicate to the server that the message transfer has been completed.
A program listing for the system is now presented:
// Λtpsor h ( ΛLp^ocl"3! r-] iq-- fUfndpC _ΛI PW Y lf_ BdefJiiP ΛIPSOCK II flmcludp "ςtdafx li" ftincHidp "afx^or h"
(tincludp "Cril J bir h" ftincludn " id h
LyppdoC J onq Λtpf onnljll)
WΛT 1 T f, // ounsel ι on pq|-nbJ is pd waitinq tor transfer pr ΓTVINΠ // Innςfprinq dira PΛU^ΓΠ // Iπirfoi pTuetn fnr »-nιn i πason I JUG // t l mi wi ll r 1 o"p
]
/ / πni in r ςς (ldo
f-ln s r ΛI Sor ^l pubJ ic f Λnync oc t ( pπvnl f At-pS rl-pt ( orKl ( Λl pSor ) nl & r rc) // no i inpl prnont 31 ion void o prtitor-icotrl CΛtp^oc eLΛ rSrc) // no liπpl empntation
// Construction public
CΛtpSocJ'eL ( ISockCal lbirl- * IΛtpCal lbac * ) void Iπi tiali e ( IDFSPΓVPI *<5«rver)
// ronii«rtion ^ ti t- p
*»πιιιπ { ΛIP„C IirROI ΛIP DΛIΛ ) Tip mo e emmi ( ΛIP SIΛRT ΛIP If Il ΛIP PCPI
ΛJ P_ΓILΓ ΛΓP_DI κ ι?r ΛI P RΓΛDY ) itp_state
ΛLpConnpcb. on ronπ
ISockCallback *m ρ5CB IΛtpCa11bac *m_pCB IΛtpProqressCallbac *m pPCB
C trinq [from fuser CStrinq fname lonq fsi7e fchksum £bs 7P CTimp fdate long fblk. fbl siz
IDFServpr *ιd£s IDFile *ιd£
// OVPΓ idable callbacks ot ctpd virtual void Oπflpr-πi VP ( nit nrrrorCotlp) virtual void OnSPiidtnil nTrrorCode) virtual void OnClo eiint nPrrorCode)
/ / Implempntation
pub! ic : virtual -CΛtpSoc e ( ) ;
Difdef _DEBUG virtual void ΛssertVali ( ) const; virtual void Dump (CDuinpContextδ dc ) const; #endif private : void InitNewFile ( ) ; void FindlDFile ( ) ; void FatalError ( int nErrorCode ) ; void SendString (CString data); void TryToSendO; CString Extractl.ine ( ) ; CString ExtractWord ( ) ;
BOOL handleControl ( ) ; BOOL handleData ( ) ; void SendResponse ( int num); void SendResponse (int num, CString msg); void SendRespons (int num, Jong arg); void SendMultilineResponse ( int num, CString data) void handleComrn ndFrom ( ) void handleCommandUser ( ) void handleCommandName ( ) void handleCommandFi l ( ) , void handleCommandBlkSiz ( ) , void handleCommandReady ( ) ; void handleCommandData ( ) ; void handleCommandΛbort ( ) ; void handleCommandReset ( ) ; void handleCommandExi t ( ) ;
Oendif // ΛTPSOCK H
// atpdata.h : essential definitions for the ΛTP protocol
(tifndef _ΛTPDΛTΛ_H_ ((define _ΛTPDΛTΛ_H_
// Commands const char *ΛtpCommands { J = {
■FROM" , "USER" , "MΛME" , "FILE", "MODE", "TYPE" , "BLKSIZE" , "READY", " DΛTΛ " , "ABORT", "RESET- , "EXIT"
); const int ΛTP_UNKNOWN_ID = enυm ΛtpCommandID ( ΛTP_FROM_ID, ATP_USER_ID, ΛTP_NΛME_ID, ΛTP_FILE_ID, ΛTP_MODE_ID, ΛTP_TYPE_TD, ΛTP_BLKSIZE_ID, ΛTP_REΛDY_ID, ATP_DΛTΛ_ID, ΛTP_ΛBORT_ID, ATP_RESET_ID, ΛTP_EXIT_ID,
ΛTP_ID_NUM obstruct ΛtpResponse ( int id; char 'message;
// JRW Macros to define ΛtpResponses entries
(♦define ΛTP_RESPONSE (valu , ymbol ) \ const int atpltjtsymbol = (value);
((include "atpdatadef . h" ttundef ΛTP_RESPONSE
((define ΛTP„RESPONSE (value, symbol ) \ {atpO#symbol , ((symbol "."),
ΛtpResponεe ΛtpResponses ( I = ( ((include "atpdatadef . h" ) ;
(tendif // _ΛTPDΛTΛ 1!
// atpsock cpp implementation of the CΛtpSocket class
((include 'srdlib h> ((include "stdafx h" ((include 'assert h>
((include atpsock h"
((include "atpdata h"
CΛtpSocket CΛtpSocke ( I ockCallback *pSCB IΛtpCallback* pCB) ( m_pCB - pCB m_pSCB - pSCB atp_mod° - ΛIP CO IROI atp_state = ΛJP_SIΛRJ ldf = HULL, ldfs = NULL data = NULL
ImtNe File ( ) ) void CAtpSorket Initialize (IDrServer "server) ( ldfs - s rver
SendResponse (atpΛI P_server_ready) )
1111111111111 1111111 1111 11111 1111111111111111 1 11 1111 111 111111 1 11111 111 1 111111 I I CΛtpΞocket Overrilable callbacks void CΛtpSocket OnR»reιvp(ιπL nErrorCode) ( CΛsyncSoc OnReceive (nEri orCode) int len if (nErrorCode) (
FatalError (nErrorCode) return )
// Read all the available data in the buffei while (1) { len - Receivefbuf bufsize) if (ilen || len — SOCFET_ERROR) break
CStrinq t pfbuf len) recv_buf +- tmp )
BOOL ret - IRUF while (ret) switch (atp_mod<=) { case ΛIP_COHrROL ret = handleCont ol ( ) break case ΛTP_DAΓΛ ret - handleData ( ) break ) re urn } void CΛtpSocket OπSenddnt nErrorCode) ( CΛsyncSocket OnSend (nErrorCode) , if (nErrorCode) (
FatalError (nErrorCode) return, }
TryToSend ( ) ) void CΛtpSocket OnClosednt nErrorCode) {
CΛsyncSocket OnClose (nErrorCode) m_pSCB- PrσcessC-.ose ( this) , )
11111111111111111111111111111111111111111111111111111111111111111111111111111 I I CSocket Implementation
CΛi-pSocket CΛtpSoc ket () ( if (data) delete data data = NULL ) void CΛtpSockoL Fatal Frror ( l nt πTrroi c o e- ) ( urrrorCod» ) void CΛtpSocket IryJoSendO ( int len strlen strlen - send_buf c ^LI p 'ngt ( ) if (strlen -- 0) return const char *bufpt r (LPC1 TR) send buf len = Send(bufptr strlen) if (len == S0CKET_FRR0R) return send_buf = send_bu£ Hid (len) ) void CΛtpSocket SendString (CString data) ( send_buf +- data
TryToSendf ) )
CStπnq CΛtpSocket f- y tractl i ne ( ) ( CJtnng t p int pos - recv_buf Fin ( \r\n ) ι£ (pos < 0) leturn tmp tmp - recv_buf Left(pos+?) recv_buf = recv_buf Mιd(pos+2) return tmp
CString CΛtpSocket ExtractWord ( ) ( CString tmp
BOOL CΛtpSocket handle-Control ( ) ( line = FxtractLme ( ) if (line IsEmptyl)) return FALSE line - line Leftdine GetLength!) 2) line TrimRight ()
CString command - FxtractWor ( ) int command_ιd = ΛTP_UNKNOWN_ID for (int 1 = 0 l - ΛTP_ID_NUM ι++) if ('command CompareNoCase (ΛtpCommands [l ) ) ) ( command_ιd ^ l break ) switch (command_ιd) ( case ΛTP_UNKNOWN_ID
SendResponse (atpSynta _error_command_unrecognιzed) break, case Λ1P_FR0M_ID handleCommandFrom( ) break case Λ1P_USER_ID handleCommandUser ( ) break, case ATP_NΛME_ID handleCommandName ( ) break, case ΛTP_FILE_ID handleCo mandFile ( ) break, case ΛTP_BLKSIZE_ID handleCommandBlkSize ( )
27
8/22882
break , case ΛTP_RFΛIJY_1 IJ liandleCoininandReady ( ) , break , case ΛT P_DΛ 1'Λ_ TD handleLoinmandϋata ( ) break , case ΛTP_ΛB0RT_1IJ liandleCoπimandΛbσrt ( ) , break , case ΛTP_RΓSCΓ_TD handleCommandReset ( ) break, case ΛTP_EXIT_T.D handleCommandExi ( ) break,
BOOL CΛtpSockot handJ eϋal i ( ) ( lonα rest - fblksire daLa l "n if (recv_buf GetLenσtlil) -- rest) rest - recv_buf G<=t engI h ( ) memcpy(data + data_len recv_bu£ ι°st) rerv_buf - rβcv but Mid (rest) data_len += rest if (data_len == fblksize) ( ιdf->WrιteBlock(fblk data) fblk = -1,
SendResponse ( pDai a_ rans £er_compl t<=d) atp_mod» - ΛTP_C0»1 ROL
// making finaljzation pvpUrιt long blk = ld --GetEmptyBloc ( ) if (blk < 0) idf->Fmali7e ( ) return TRUE, ) return FALSE,
) void CΛtpSockot handleCominandrrorn ( ) ( CString from, pass, if (atp_state ι= ΛTP__S1ΛRT) (
SendResponse (a pBad_sequencs_of_commands) return, ) if (line IsEmpty ( ) ) (
SendResponse (atpSyntax_errσr_ιn_parameters_or_arguιnents ) return, ) from = txtractWord ( ) , pass = line, line Empty ( ) ,
// no authentication so far ffrom = from,
SendResponse (atpUser_loggpd_ιn) atp_state = ATP_LOGIN,
void CΛtpSocket . handleComrnandUser ( ) ( CString to;
If (atp_state '= ΛTP_LOGIN) (
SendRespons (atpBad_εequence_o _commands) return; )
if (line 1-rιnpf, ( ) ) (
SendResponse ( i yπl ax orror_ιn p-irame ei s_or_arguιnents ) return ) to - Eytract or ( ) if ('line IsE ptyO) (
SendResponse (a pSyn y_error__ιn paraineter _or_arguments ) return )
// no recipient verification yet fuser - to
SendResponse ( a I pPec I ι nL_o ay ) atp_state - ΛIP„RCPi
ImtNewFile ( )
void (ΛtpSoc)<=l IiiilIJowl ιl»(| ( Cname = fll7P - 0 f bsi z° = 0 frhksυm - 0 ldf - NULL fbl - -1 void CΛtpSocket )nnr]J αcomiinndllαme ( ) ( CStiinα name if (atp_staLe '- ΛIP RCPD ( en RpsponsDia(pBirJ sequence f ^commands ) i eturn ) if (line IsEmpty ( ) ) (
SendRespons0 (a p yn tax_error ιn_parame tor _or_ιrαuments ) return ) name - line line Frnpty ( )
// ++ Check validity here fname - name if (fsize - 0) (
SendRespon e ( it Fi in formatιon_okay) atp_state - ΛTP_FILE ) else
SendResponse ( at pFi le mfoπnat: on_o ay_a a tιng_completιon)
void CΛtpSocket lnπ l<"( om andrile ( ) ( long s ze chksum CString tmp if (alp_ tιt° - ΛIP_PCP1) (
SendResponse (a pBad sequence_of_comιmnds ) return ) if (line TsEmpty ( ) ) (
SendResponse (atpSyntay_error_ιn_parame ers_or_arguments ) return ) tmp = ExtractWord ( ) size = atol(tmp) chksum - 0 tmp = ExtractWord ( ) if ( I tmp IsFrnpty ( ) ) chksum = atol(t p) fsize = size fchksum = chksum if (' name IsEmptyO) {
S ndRe ponse (atpFιle_mf orm tιon_okay )
atp_state = ΛTP_FILE;
) else
SendResponse (a tpFιl _ιnforma ιon„okay_a a ιng_completlon)
void CΛtpSocket- FmdlDFileO ( if (idf) return,
IDFile *ιdftπιp = new IDFi l ( fnarn , fsi7e, fcliksuin) ; IDFile *oldidf - idfs ->rιnd] DFile ( idftmp) , if (oldidf '= NULL) ( delete ldft p, idf = oldidf, ) else idf = ldftmp, ) void CΛtpSocket handleCoinmaπdBlkSize ( ) ( CStnnα tmp; long bsize, sbsize, if (atp_state '= ΛTP^FILE) (
SendResponse (atpBad_sequence_of_commands ) return; ) if (line IsEmpty ( ) ) (
SendResponse (atpSyntax_error_ιn_parameters_or_arguments ) , return, ) tmp = Ex ractWord () , bsize - a ol(tmp)
FindlDFlle ( ) ; if (idf->IsFinalιzed ( ) | | idf ---IsBound( ) ) ( sbsi7e = idf ->GetBlockSιze ( ) ; if (sbsize == bsize) (
SendResponse (atpBlock_sιze_accepted, sbsize) , fbsize = bsize; atp_state = ΛTP_BLKSIZE, ) else
SendResponse (atpBloc ιze_already_set_permanently, sbsize) , return; ) sbsize = idf->SetB) ockSize (bsize) , if (sbsize '= bsize) (
// suggested size from the IDFile implementation SendResponse (atpBlock__sιze_not_acceptable sbsize) , return,
) fbsize = bsize;
SendResponse (atpBlock_sιze_accepted, fbsize) ; atp_state = ΛTP_BLKSIZE, id s->Λd (idf ) ; // ++ error checking here perhaps
// (although this is verified at a later stage)
void CΛtpSocke ■: handleCommandReady ( ) ( asser (fbsize > 0 && idf 1= NULL), if (atp_state '= ΛTP_BLKSIZE) (
SendResponse (atpBad_sequence_of_commands) return; if ( ' idf->IsBound() && ' idfs->Λdd (id ) ) (
SendResponse (434 ) ; return; ) long blk = idf ->GetEmptyBloc ( ) ;
if (blk 0) (
SendResponse (a tpFile completed) , idf->Fιnalize ( ) , return; } fblks ize = idf ->GetBlockSι ze ( blk) ; long s tall = rn_pCB-> Rec:jues tTransf er ( fblksize ) , if (stall < 0)
// The control pioc will invoke a reply later return, if (stall > 0) (
SendPesponse (atpMarlιιne_busy_Please_stall , stall) , return, ) if (data) delete!] data, data = new char ( fblk ize) , if ('data) (
SendResponse (atpLocal_error ) , return, ) fblk = blk;
SendResponse (atpBlork_reques ted, fblk) , atp_state = ΛTP_PEΛDY, ) void CΛI pSockeL hand) t ominaudUata ( ) ( CString tmp; long bsize; assert! fblk >= 0 S.& fblk '= ( sιze-1) / fbsize ), if (atp_state '= ΛTP_REΛDY) (
SendResponse (atpBad_sequence_of_commands) , return, ) tmp = ExtractWord ( ) , bsize = atol(tmp), if (bsize '= fblksize) (
SendRespons (atpBlock_ ιze_not_acce table fblksize) return; ) long stall = m_pCB->Reques Transfer ( fblksize ) , if (stall < ϋ)
// The control proc will invoke a reply later return; if (s tall > 0 ) (
SendRespons (atpMachme_busy_Flease_s tall , stall ) , return ; )
SendResponse (atpData_transfer_starting) , da a_len = 0; atp_mode = ΛTP_DΛTΛ; atp state = ΛTP_BLKSIZE; } void CΛtpSocket • • handleCommandΛbort ( ) ( if (atp_state '= ΛTP_REΛDY) (
SendResponse (atpBad_sequence_of„commands) ; return; ) fblk = -1;
SendResponse (atpData_transfer_aborted) , atp_state = ΛTP_BLKSIZE; ) void CΛtpSocket :* handleCommandReset ( ) (
if (atp_state -- ΛTP_SJ"ΛRT | | ιtp_stnte -- ATP_IOGIN) ( SendRespon (atpBad_ςequenc _of command ) return
)
SendResponse ( τl pFile inloπin! ion cleared)
Ini fNewFt ] e ( ) atp_stat e - ΛIP IK I
void CAtpSockel Innd! eCoirananclryi t ( ) (
SendResponse (at pClosιng_ ontιol_connec ion)
Close!) atp_state - ΛIP_ TΛRT ) void CΛtpSocket SendResponse ( int nuin) ( for (int ι = 0 ι++) if (ΛtpResponses ( l ) id -= num || ' ΛtpResponses [ l ) id) ( CString mp tmp GetBuf ter (1024 ) tmp Format (" T ?-s\r\n num ΛtpResponses [ ι ] message) SendString ( mp) return ) ) void CΛtpSocket SendResponse (int num CStnnci msg) {
CString tmp tmp GetBuf fer (1074 ) tmp Format ("Y H\r\n nu msg)
SendString ( tmp) ) void CΛtpSocket SendResponse ( mt num loner arg) ( for ( int 1 = 0 ι++ ) if (ΛtpRe,sponses ) id -= num || 'ΛtpResponses [ I ] id) { CString tmp tmp GetBuf er (1024) tmp Forma ( "rd (%ld) %s\r\n num arg ΛtpResponses ( l J message) SendString ( tmp) return ) ) void CΛtpSocket Send u 1 i ineRe ponse ( in nu f String data) ( or (int 1 - 0 n t ) if (ΛtpResponses [l] id -- num || ' ΛtpResponses I l ) id) ( CString tmp tmp GetBuffer (8196) tmp Format! %d- ϊs\r\nSls\r\n%d 9-s" num Λt pReςponse ( l J message data num ΛtpResponses [ l ) message) SendString ( tmp) return ) ) ftifdef _DEBUG void CΛtpSocket ΛssertValid ( ) const
{
CΛsy cSocket ΛssertVali ( ) ) void CΛtpSocket Dump (CDumpCoιιtext& dc ) const {
CΛsyncSocket Dump(dc)
) fjendif / /_DEBU<3
// '
// C++ header file // (c) 1996 ACS //
(iifndef _IDFSERVER_H_ ((define _IDFSERVER_H_ ftinclude "stdafκ.li" II in lude "oil 1 back . h" ((include "options. Ii" class IDFile ( privat :
IDFile(const IDFilef<); // no implementa ion void operator= (const lUFilefc) // no implementation public :
IDFile () ;
IDFile (IIDFCallback 'pCB, CString idCna e); IDFil (CString name, long size, long chksum = 0 ) ; -IDFile! ) ;
BOOL operator== (const IDFilefc co p) const;
BOOL SetFilelnfo (CString name, long size, long chksum = 0); long GetBlockSiz ( long blk - -1) const; long SetBlockSize ( 1 ong bsize);
BOOL IsBouπdl) const;
BOOL CreatelDFdlDFCallback *pCB, CString tempdir); long GetBlockNum ( ) const; long GetEmptyBlockiurnl ) const;
BOOL GetBlockState ( long bnum) const; long GetEmptyBlock ( ) const;
BOOL Wri teBloc ( long bnum, const void *buf ) ;
BOOL IsFinalized ( ) const; BOOL Finalize ( ) ; public : friend CDumpContextfc operator<< (CDumpContextSi cout, const IDFilefc idf); pri at ; friend CΛrcliiveJV op rator<< (CΛrchivek cout, const IDFilett idf); friend CΛrchiveS, opera tor>> (CΛrc i vek cin, IDFilefc idf); priv t :
IIDFCallback *m_pCB; publi :
// file info
CString fnarne, tempname; long fsize, fchksum; long fbsize; private :
// internal state
BOOL fbound, ffinalized;
CFile 'idfile, *ffile; long btable_len, first_free, empty_num; int *btable; private: void Initialize!); void Store ( ) ; void Restore (CString idfname); ) ;
class IDFServer ( private :
IDFServer (const IDFServerfc); // no implementation void operators (const IDFServert) ; // no implementation
publi :
IDFServer (IIDFCallback *pCB, COptions Opts) -IDFServer () ;
IDFile 'FindlDFi le (IDFile 'idf); BOOL ΛdddDFile 'idf);
// Implementation: private :
IIDFCallback *ιn_pCB; COptions *options; CPtrΛrray idfs; private : void LoadlDFiles (CString dir); );
Itendif // _IDFSERVER_H_ // End of headers
// callback d°fιnLιons
//
// C++ header file
// (c) 1996 ACS
//
Sifndef _CΛLLBΛCK_H_ (Idefine _CΛLLBΛCK_H_
// Callback for socket connections
// Classes using sockets should inherit tins class ISockCallback ( public virtual void ProcessPendingΛccept (CΛsyncSocket *=ιock) { sock ) virtual void ProcessAcceptFrror (CΛsyncSocket * ^ocV- mt nErrorCode) ( sock nErrorCode, ) virtual void ProcessPendi ngData (CΛςyncSocket *sock) ( sock ) virtual void Process 1 ose (CΛsyncSocket *sock) ( sock ) )
// Callback for IDT obseivers class IDFJ ]e class IIDFCallback ( public virtual void ProcessDσwn 1 oadedFile ( IDrile *ιdf) ( idf ) virtual void Process rittenBlock (IDFile * idf ) ( idf ) ).
// Callback for ATP protocol controllers class IΛtpCallback ( public
// VerifyUser should be in IDFServer actually
//virtual BOOL VerifyUser (CString from CString user) ( return TRUE )
// Return suααested stall in seconds 0 - OY virtual long Reques Transfer ( long size) ( size return 0 ) ), class ΛtpConnection
// To be inherj ted by the Λtp observer class IΛtpProαressCallback ( public virtual void ProcessConnectionState (const ΛtpConnectιon& conn) ),
// To be inherited by the Λtp Socket controller class IΛtpStateCallback { virtual BOOL GetConnectioπSrate ( lonα uid ΛtpConnectiσn'fe conn) virtual int GetΛllConnectionStates (ΛtpConnection* k conn) )
#endιf // _CΛLLBΛCK_H_
// End of headers
// IDFServer . cpp : Implementation of the IDFServer and IDFile classes // C++ code file // (c) 1996 ACS // ft include "stdafx.h" ttinclude " IDFServer . h "
// IDFile Implementation
IDFile: : IDFileO (
Initialize ( ) ; )
IDFile :: IDFile (CString name, long size, long chksum) ( Initialize ( ) ; fname = name; fsize = size; fchksum = chksum; )
IDFil :: DFile (IIDFCallback *pCB, CString idfname) (
Initialize ( ) ; m_pCB = pCB;
Re tor ( idfname) ; )
IDFile: :-IDFile() ( if (ffile) delete ffile; if (idfile) delete idfile; if (btable) delete btable; ) void IDFile: : Initialize ( ) ( fbound = ffinalized = FALSE; idfile = ffile = NULL; btable = NULL; fname = tempnajne = fsize = fbsize = fchksum = 0; btable_len = first_free = 0 ; ) void IDFile: :store ( ) ( if (! fbound &fc ! ffinalized ) return; idf ile->Seek oBegin ( ) ;
CΛrchive idfarchive (idfile, CΛrcliive :: store) ; idfarchive << *this; idfarchive , Flusli () ; // JRW Archive file idfile->Flush() ; // JRW IDF file, idfile->SetLength (idfile->GetPosition!) ) ; ) void IDFile: : Restore (CString idfname) ( CFileException e; idfile = new CFile!); if (! id ile->Open (idfname, CFile : :modeCreate | CFile :: modeNoTruncate | CFile : : modeReadWrite | CFile :: shareDenyWri te , ke)) ( delete idfile; idfile = NULL; throw new CFileException () ; ) id ile->SeekToBegin ( ) ;
CΛrchive idfarchive (id ile, CΛrchive :: load) ; idfarchive >> *this; if (fbound) ( ffile = new CFile (); if (! ffile->Open (tempname, CFile : :modeCreate | CFile : :modeNoTruncate CFile : imodeWrite | CFile :: shareDenyWri te , &e)) ( delete ffile; ffile = NULL; throw new CFileException () ;
) ) )
BOOL IDFile- operators- ( ons I IDrileS. comp) const ( return (fname == comp fname us, fsize -= comp fsize && fchksum == comp fchksum) ; )
BOOL IDFile SeLFilelnfo (f t ring name long size, long chksum) ( if (fbound || ffinalized) ι«iurn rΛLSE, fname = name, fsize = ize, fchksum = chksum, return TRUE, ) long IDFile SetBlockSize ( ] rjπq bsize) ( if ( i fbound && ' ffinalized) fbsize - bsize, return fbsize, )
BOOL IDFile I Bou dO const ( return fbound, )
BOOL IDrile CreatelDFdlDFCallback 'pCB, CString tempdir) ( if (fbound || ffinalized) return TALSE, if (fname IsEmptyU | | fsize — 0 | | fbsize <= 0) return FALSE, m_pCB = pCB,
CFileException e,
// open the real file char tmp [MΛX_PΛTH) , if ( 'GetTempFileName ( tempdir , fname, 0, tmp)) return FALSE, tempname = tmp; ffile = new CFil ( ) , if ( i ffιl»->Open ( tempname , CFile modeCreate | CFile- modeWπte | CFile- • shareDenyWrite , fee)) ( delete ffile; ffile = HULL; return FALSE, ) try ( ffιle->Ser_Length ( fsize) , ) catch (CFileExcep ion e) ( delete ff le; ffile = NULL; return FALSE, ) idfile = new CFileO, if ( i idfιle->Open ( tempname + - idf",
CFile: -modeCreate | CFile :modeReadWrιte | CFile :• shareDenyWrite , &e)) ( delete ffile; delete idfile; ffile = idfile = NULL, return FALSE; ) fbound = TRUE; empty_mιm = btable_len = (fsize + fbsιze-1) / fbsize, fιrst_free = 0; btable = new int (btable_len) ; for (int 1 = 0; i < btable_len; i++) btable (ι) = 0; try (
Store ( ) ;
) catcli (CFi leFxc°pl ion e ) (
/ / ι + al l set bυ l carinol save s tatus f or some return TRUE
long IDFile GetBloc Num ( ) roust ( return btable_len ) long IDFile GetFmpl yB) ockUuin ( ) const ( return empty_num ) int IDFile GetBlockSt at (lonσ bnum) const ( if (bnum < 0 | | bnum > - btable_leπ) return -1 return btable I bnum)
) long IDFile GetBlockSize ( ] ong bnum) const ( if (bnum -- (fsize D/fbsize) return fsize - fbsize'bnum else return fbsize ) long IDFile C tEmptyBloc ( ) const ( if (ffinalized || fιrst_Cree -•- btable len) return 1 return fιrst_free )
BOOL IDFile WriteBloc ( long bnum const void *buf) ( if (ffinalized) return TRUF if ('fbound) return FΛI SE if (bnum < 0 | | bnum >- btable_len) return FALSE if (btable [bnum) ) return 1 RUE try ( ffile >Seek(bnum * fbsize CFile begin) if (bnum + 1 - btable Ion) f fιle->Wrιte (but fbsize) else f f ιle->Wπte (buf fsize T fbsize) ffile ^FlushO // JRW Temp file ) catcli (CFi lerxcepr ion e) ( return rΛLSE )
// data written update status btable (bnum] = 1 empty_num-- lf (bnum == fιrst„free) while (fιrst_free < btable_len && btable [ fιrst_£ree] fιrst_free++ if (m_pCB) m_pCB->ProcessWrιttenBlock( this)
// If file is completed attempt finalization
// or not make tliat explicit finalization can
// be t me intensive better take care of the
// protocol first
//
//if ( ' empty_num)
// Finalize!) try {
Stored ) catch (CFileException e) (
// ++ Status cannot be saved ) return TRUE
BOOL IDFile IsFinalized ( ) const ( return ffinalized
BOOL IDFile -Finalize!) ( if (ffinalized l.t, m_pCB) m__pCB->ProcessDownloadedFi le ( this ) , if ( i fbound) return FALSE, if (fιrst_free - btable_len) return rΛLSE, try ( ffile->Close() , ) catch (CFileException e) ( return FALSE, ) fbound = FALSE, ffinalized = TRUE, delete [J btable, btable = NULL btable_len = f ιrs t_f reo = n , delete £ f J 1 f f i le = NULL i f (m__pCB) ln_pCB ^ Pr ocessDownloadedFi lp ( till s ) return TRUE,
// IDFile Serialization
CDumpContextSi operators (CDumpContextSi cout. const IDFilet idf) { idf, return cout, )
CΛrchivefe operator<< (CΛrchivefe cout, const IDFilefe idf) ( // Magic number cout << I' << D' <' T' -< 1' cout -'-' idf fbound <^ idf ffinalized cout <' idf fsize " idf fchksum <- ιd£ fbsize cout << idf btable_len " idf fιrst_free ^-- idf empty_πum for (mt 1 = 0, l < idf btable_len ι ++) cout <' idf btable(ι), cout WriteStπng (idf fname + \r\n") cout Wn teΞtring ( idf tempname + "\r\n"), return cout, )
CΛrchiveg, operator>> (CΛrchiveSt cin, IDFilefe idf) ( if (idf ffile) delete idf ffile; idf ffile = NULL, if (idf btable) delete ιd£ btable, idf btable = NULL, char magic (4 ] , cin >> magictO) >> magicP) >> magic]?) >> magιc[3), if (magiclO) ι= 'I' II magicll] ι = 'D' || magic ( ? ] • = ' F ' \ \ magic [ 3 ] ' = ' 1 ' ) throw new CFileException!) , cm >> idf fbound >> idf ffinalized, cm >> idf. fsize >> idf fchksum >> idf fbsize cin >> idf .btable_len >> idf fιrst_free >> idf empty_num; if (idf btable_len) idf . btable = new mt ( idf btable_len] , for ( t i = 0 ; l " idf btable_len ; ι + + ) cxn >> idf .btable 1 i ] ; c . ReadString ddf fname ) ; cin ReadStπng ( idf tempname ) ; return cin;
// IDFServer Implementation
IDFServer IDFServer (IIDFCallback *pCB COptions *opts) ( m_pCB = pCB, options = opts,
CFileStatus fstat, if (crile GetStatus (opt ions->IDr_DIRFCrORY fstat)) if (fstat m_attπbut e JV CFile directory) ( LoadlDFiles (options->IDr_DIRECrORY) , return, ) throw new CFileException!),
)
IDFServer -IDFServer!) ( for ( t l = 0, l •- l fs GetSizeO ι + o) delete (IDFile *)ιdfs|ι], ldfs Re oveΛll, ) void IDFServer Loadl Γ lies (CString ύ x r ) ( WIN3?_FIND_DΛTΛ fdata HΛNDLF search_ptr searchjfr = FindFi rstFi 1 e (dir ^ " \ \ * idf fefdata) if (search_pfr -= 1NVΛLID_1IΛNDLF_VΛLUI ) return do (
// verify attributes is it a writable file"? if (fdata dwFileAttributes fe FJLE_ΛTTRIBUrE_DIREC10RY | | fdata dwFileAttributes & FILE_ΛITRIBUTE_PEΛDONLY) continue,
CString filename = dir + \ \ " + fdata cFileName
// verify age and del te f too old
CTime ftimelfdata f tLastWri teTime) if ( (CTime GetCurrent'I i ( ) f ime) GetTotalSeconds ( ) > optιons->IDF_RECLΛIM_TIME) (
CFile Remov ( filename) , continue, ) try (
IDrile *ιdfιle - new IDFile (m_pCB, filename)
Λdd(jdfιle) , ) catch (CFileFxception e) (
// well, tough, notliing we can do if we can t read the file ) catch (CΛrchiveEyception e) ( ) ) while (rindNextFij ( earch_ptr fefdata)) FmdClo e ( search_ptr )
BOOL IDFServer- -ΛddtlDFile *ιd£) ( if ( i ιdf->IsBound( ) (<& ' i f ->IsFιnalιze ( ) ) ( if ( • ιdf->CreatelDF(m_pCB optιons->IDF_DIRECTORY) ) return FALSE, ) idfs Add (idf) , return TRUE,
IDFile "IDFServer TindlDFile ( IDFi le *ιdf) ( for (int l = 0; l < ldfs GetSizeO n + ) if ('(IDFile *)ιdfs[ι) == *ιdf) return (IDFile *) ldfsli], return NULL, )
// End of code
2
//
// C+^ header file // (c) 1996 ACS //
(tifndef _PΛCKriLF_H_ ((define _PΛCKFILE_H_
((include "stdafx h typedef WORD UINT16 typedef DWORD UINF3?
// Oh how 1 wish Vf it could place constants in classes const UINT32 7ι pFi le_LocSι g - 0x0403<lb50L const UINT16 7ιprι le„MethodStore - 0 const UINT16 7ι pFi l°_FlagEncrypted - 1 const UINTIG ZιpFιle_FlagExtHeader = 8 class ZipFile private CFile ( public
ZipFilednt hFile)
ZipFil (CSt ring fname UINT nOpenFlags - CFiJe modeRead) virtual -ZipFileO
UINT 16 flags
UINT16 method
UINT32 time
UINT32 crc
UINT32 csize
UINT32 osize
UINT16 namelen
UINT16 exfralen ) struct ZipExtHeader ( char buf(16] ) struct ZipEncryptHeader ( char buff 12 J )
7ιpFιleHeader ReadHeader ( ) UINT16 ReadShortf) UINT3? ReadLongO )
ZipFl J e 7 pFι le ( mt hFi l e )
CFιle(hFιle) { )
ZipFile 7ιpFιo e (CSt π ng fname UINT nOpenFlags)
CFile (fname nOpeiirJ ags ) { )
ZipFile 7ιprιle() (
-CFlle()
)
ZipFilelleader head ZipFncryptHeader enc enc ZipExtlleader ext eyt try (
SeekToBegin ( ) , badeof - skip = FALSE hile (1) ( head = Readlleader ( ) if (head sig ι- ZipFile LocSig ) break badeof = TRUE, num++
// skip encryption header if piesent if (head flags 6 ZιpFιle_FlagEncrypted) ( skip = TRUE,
Seek (sizeof (enc) CTile current) ) skip = skip II ( ea method '= 7 lpn le_MethodStore ) skip = skip I I (head csize '- head osize)
// read filename if (Read(buf, head namelen) ' = head namelen) break
// convert the filename L0 standard form // create directories if needed CString fname = dir, if ('skip) {
CString tmp(buf, head nam=len) , int pos; while ((pos = tmp FindOneOf ( " I \ \ " ) ) >= 0) ( fname = fname + "\\" + tmp Left (pos) tmp = tmp Mιd(pos+l),
DWORD attrib = GeLFileΛttrjbυte (fname) , if (I (attrib R FILE_ΛTΓRIBUTE_DIRECTORY) II (attrib == -1 && 'CreateDirectory ( fname, HULL))) (
// create destination file
CFile file, skip = skip || I ile Open (fname CFile • -modeCreate | CFile -modeWrite)
// transfer contents if (skip)
Seeklhead csize, CFile current),
else ( int left = head csize while (left) ( int len = Readlbuf left - bufsize ' left bufsize) if (len == 0) break left -- len, file Writelbuf len)
) file Closed
)
// sk p extended header if (head flags 0 ZιpFιle_FlagExtHeader) Seek(head extralen CFile current), badeof = FALSE,
)
) catch (CFi lei xcept ion e) ( return FALSE, ) return I1 badeof && num), )
ZipFile ZipFilelteader ZipFile ReadHeadei ( ) ( ZipFileHeader head head siq - ReadLong ( ) head xxxl - ReadShort ( ) head flags = ReadShort () , head method - ReadShort ( ) head time = ReadLong!) head crc = PeadLongi) head csize = ReadLong ( ) , head osize = ReadLong ( ) head namelen = ReadShort () head extralen = ReadShort () return head )
UINT16 ZipFile ReadShort ( ) ( unsiαned char buf[7]
Readlbuf 2) , return UIIJT16 ( ( (UINT16) buf(OJ) | UI1!T16( (UUINT16) buf(lj) - < 8))), )
UINT32 ZipFile ReadLong ( ) ( UINT32 lo = ReadShort ( ) UINT3? hi - ReadShort () -- 16 return lo | hi ,
// End of code
// Clientl h main header file Cor the CLIFMIl -ipplicit ion //
#ιfndef ΛFXWIN H
(terror include stdafx h before including this file for PCH ttendi tinclude "resource h // main symbol*-
((include cillback h"
((include options h
((include "ldfserver h dinclude "atpsock h"
#ιnclude " socketconf rnl h
11111111111111111111111111111111111111111111111111111111111111111111111111111
II CClientl
// See Clientl cpp for the implementation o£ this class
// class CClientl public CWinΛpp IIDrcallback
( public
CClientl ()
// Overrides
// ClassWizard generaTel virtual function overrides // ( (ΛFX„VIRTUΛL (CClientl) public virtual BOOI Im tlnstanc e ( )
//) )ΛFX_VIRΓUΛL
// Implementation public virtual void ProcessDownloadedFi le ( IDrile *ιdf) private
COptions *m_optιons IDFServer *m_ιdfserver SocketControl *m_atpserver
// ( (ΛFX_MSG(CClιentl)
// NOTE the ClassWizard will idd and remove member functions here
// DO NOT EDIT what you see in these blocks of Generated code
//) )ΛFX_MSG
DECLΛREJiESSΛGE_MΛP ( )
11111111111111111111111111111111111111111111111111111111111111111111111 II 1111
// Clientl. cpp : Defines the class behaviors for the application, //
((include "stdafx. h" ((include "stdlib.h"
//((include <shlgυid.h> extern "C" ( ((include <winnetwk.h> ((include <shellapi . Iι> (linclude <shlobj.h> β include -cobjbase . )ι> Jinclude <ini guid . h>
)
(linclude "winnls.h"
((include "Clientl. h"
♦include "ClientlDlg . h "
(linclude "packfile.h"
((include "ProcessMonitor.il" // .JRW 961015 ffifdef _DEBUG
((define new DEBUG_NEW
(iundef THIS_FILE static char TIIIS_FILE|) = FILE._;
(tendif
11111111111111111111111111111111111111111111111111111111111111111111111111111 II CClientl
BEGIN_MESSΛGE_ IΛP (CClientl , CWinΛpp)
// ( (ΛFX_MSG_MΛP (CClientl)
// NOTE - the ClassWizard will a d and remove mapping macros here .
// DO NOT EDIT what you see in these blocks of αenerated code!
//))ΛFX_MSG
ON__C0MMΛHD(ID_MELF, CWillΛpp: lOnllelp) END_MESSΛGE_MΛP ( ) ;
II 111 II 111 II I II II 111 II 11 II 111111111111111111111111111111111111111111111111111 II CClientl construction
CClientl: : CClientl ( ) (
// TODO : add construction code here,
// Place all significant initialization in Initlnstance )
1111111111111111111111111111111111111111111111111111111111 / 111111111111111111 II The one and only CClientl object
CClientl theΛpp;
I II 111111111111111111111 II 1111111111111 II 1111111 III 11111111111 II 1111111111111 II CClientl initialization
BOOL CClientl : : Initlnstance ( ) ( if ( IΛfxSocketlnit 0 ) (
ΛfxJ<lessageBox(lDP_SOCKETS_INIT_FΛILED) ; return FALSE; )
Colnitialize (NULL) ;
// Standard initialization
// If you are not using these features and wisli to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need. ,
Uifdef _ΛFXDLL
Enable3dControls () ; // Call this when using MFC in a shared DLL
(telse
Enable3dControlsStatic () ; // Call this when linking to MFC statically #endif
CClientlDlg dig; m__pMainWnd = &dlg; m_options = new COptions ( ) ;
m__a tpserver - new Socket cout rol ( ) ιn_ιdfserver - new IDFServer ( tins m_optιons) if I'm atpserver > Tni t i al ize (m ldfserver)) {
AfxI-lessigeBoy ( "Cannot bind to socket' ) return FALSE )
(lifdef PROCESS_MONITOR if ( 'Stai tMonitorlliread ( ) ) (
ΛfxMessageBo ( Cinnol start monitor thread ) return FΛLST ) dendif // PROCESS_MOIII 10R mt nResponse - dig DoModalU if (nResponse — JDO ) (
// TODO Pl-ioe co l τe to Inndle when the dialog is
// dismissed with 01
) else if (nResponse -- 1DCΛNCI I ) (
// TODO Place code lieie to handle when the dialog is // dismissed with Cancel )
// Since the dialog hi- 1 ePn rlowd return rΛI SΓ so that we exit the // -ipplic-i tion rathei than <-taιt the τpplιcatιoπ s Me sag pump return FALSE
BOOL FileF-ists (LPCSIR Jpszfath) ( return (GetFileΛttributes (IpszPath) '- 1) )
HRESULT CreateLink (LPCSTP lpszPa hobj LPCSTR IpszPathLink
LPCSTR IpszDesc LPCSTR lpszlcon) (
HRESULT hres
IShellLink* psl - NULL
// Get a pointer to the IShellLink interface hres = CoCreatelnstance (CLSID ShellLink MULL
// Set the path to the shortcut target and acid the // description p l->SetPath(lpszPathObj- ) psl->SetDescπpfιon(lpszDesc) if ('lpszlcon || ι 'lpszlcon) (
// Add one of our irons char myname (MΛX_PΛIH)
GetModuleFileName (NULI myname 11ΛX_PΛIH) hres = psl->SetIconLocatιon (myname 1) // need a constant here ) else hres = psl->SetIconLocatιon (lpszlcon 0)
// Ouery IShellLink for the IPersistFile interface for saving the
// shortcut in persistent storage hres - psl->0uerylnterface (IID IPersistTile (void **) &ppf) if (ppf) (
WORD wsz (MΛX_PΛTHJ
// Ensure that the string is ANSI MultiByteToWideChar (CP_ΛCP 0 IpszPathLink 1 wsz MΛX_PΛTH)
// Save the lm by calling IPersistFile Save
hres - ppf >Sιve(wsz IRUF) ppf ->Release ( )
) psl->Relea'3e ( )
) return lire1;
) void CClientl Prnrp-jDo ii) oidodf 11 e ( TOrile *jdf) (
/ ΛfxMessageBoκ ( Tile ^ jdf >fname ^ downloacieci n<- + idf >tempname) r <3t πnq dirpilh - in npt-ion- -TPF HJPrcrORY i \\ i i f >fname
CreateDirectory (dιr]i I )ι HULL)
XipFile zip (idf -leinpnaine) zip E tractFi l s (di rpath)
//system! "unzip o \ " o idf -tempname + \" d \ + dirpitti + \ )
CStrinα rootpath - irpath + Wroot htm" if ( ' FileExists (rootpath) ) return
CStrong iconpath - dirpath A "Wrooticon ico" if (' FileE ists ( iconpath) ) lronpatli - ""
LPΠEMIDLI T ιdiι=u char desktop I I!ΛX PΛ 111 )
HRFSULT res res - -HGet per-iall old°rl ocati on (NULL ( <5IDL_lJTSr rOFDlPCClOPY fcidlist) if (res i- iJOFRROR) return
If ( i SHGetPathFromlDList (ldlist desktop)) return
CStrinσ linkpath - desktop linkpath += \\" i ιd£ >£narne ι Ink"
CreateLm rootpath lmkpatli idf >[name iconpath) return
//
// C++ header file // (c) 1996 ACS // t fndef _SOCFEICONΓROI_H_
#defιne _SOCKETCO IROL_H_
((include "stdafx h" ((include callback h"
((include "lstn ock h"
((include "atpsock )ι" const ΛTP_PORΓ - 608 class SocketControl publir J ockr allback TΛtpCallback public
SocketControl () virtual SocketControl ( ) virtual void ProcessPendmαΛcc pt (CΛ ync orket * ock) virtual void ProcessClos (CΛsyncSocket *sock)
BOOL Initialize (IDFServer "ldfs) private
IDFServer *m_ιdfs qSork ( *tn Lsork CPtrΛrray in sockets m tolelet )
Oendif // SOCKETCONIROI _ // End of headers
//
// C++ code file // (c) 1996 ΛCS //
((include "stdafx. h" ((include " SocketControl . h"
6ocketControl :: SocketControl ( ) ( m_lsock = NULL;
SocketControl : : -SocketControl ( ) ( if (mjsock) delete m_lsock; ιn_lsock = NULL; )
BOOL SocketControl :: Initialize ( IDFServer *idts) ( m„idfs = idfs; m_lsock = new CListeningSocket ( this ) ; if (m_lsock->Create(ΛTP_PORT) !<& ιn_lsock->Listen ( ) ) return TRUE; return FALSE; ) void SocketControl :: rocessPendingΛccept (CΛsyncSocket *sock) ( //for (int i = 0; i < m__todelete . Ge tSize ( ) ; i ++) // delete m_todelete [ i ) ; / /m_todelete . RemoveΛll ( ) ;
CΛtpSocket *atp_sock = new CΛtpSocke ( this , this); if (sock->Λccept ( *atp_sock) ) ( atp_sock-> Initiali e (m„idfs) ; m„sockets .Add (atp__sock) ; ) else delete atp_sock; void SocketControl :: ProcessClos (CΛsyncSocket *sock) ( int size = m_sockets .GetSize ( ) ; for (int i = 0; i < size; i++) if (m_sockets ( i 1 == sock) ( m_sockets . RemoveΛt ( i ) ; m_todelete . Λdd (sock) ; )
// End of code
/ / lstnsock h interf ace of the ( Li s tern ngΞor-ket class // tf ifndef LSTNS0C _11
((def ine LS'1 NS0CK_H class ISockCallback, class CListeningSocket public CSocket
(
DECLΛRE_DYNΛMIC (CListeningSocket) private
CListeningSocket (const CLi s teni αSocketfe j rc), // no implementation void operator= (const CLi teningsockett rSic), // no implementation
// Construction public
CListeningSocke ( ISockf a 1 I bark * pCB)
// Attributes public
ISockCallback* m_pCB
// Ovemdable callbacks protected virtual void OnΛcceptdnt nEriorCode)
// Implementation public virtual -CLis teninqSockec ( )
(tifdef _DEBUG virtual void ΛssertValid ( ) const virtual void Dump (CDurnpCoiit yt& dc) const (tendlf ) (tendlf // LSTNSOCK_H
// lstnsock cpp implementatioi of the CListeningSocket class
((include "stdafx h" ((include "lstnsock " ((include "callback h
CListeningSocket CLi steningSocket ( ISockCallback* pCB) ( m_pCB = pCB, )
1 111 1 1 1 1 1 1 1 1 111 11 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 11 1 11 11 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 I I CListeningSocket Overridable callbacks void CListeningSocket OnΛcceptdπt nCrrorCode) {
CSocket • -OnAccept (nErrorCode) , if ( ' nFrrorCode) m_pCB~-Proces Pen ι ngΛccept(thιs), else m_pCB->ProcessΛccepi Error ( this , nLriorCode) , )
1111111111111 111 11111111111 1 1111 1 1111 1 1111 1 1111111 111 111 11 1 111 1111111 11 1111 1 1
(
CSocket ΛssertValid ( ) ) void CListeningSocket Dump (CDumpContextSi c) const (
CSocket Dump(dc), ) (temdif //__DEBUG
IMPLEMENT_DYI1ΛMIC (CListeningSocket, CSocket)
d include <s l dio h- d inrlude < os tream h> f includ" <wιnsork h- (t include <strιng h- cons t long def aul t_block 1 6TH1 const long j nbuf r- i z - ] lTi long mbuf_len rliar mbuf [ liibυ f sj ze+ 1 1 char *data_buf - NULL enum atp_errors ( EΛTP_NOERR0R = 0 EΛTP__TTMEOUΓ FΛTP_BUFFFROVΓRFLOW EATP_CΛNNOTCONNFC J" FΛTP_UMEXPECTEDEXIT EΛTP_BΛDFILF FΛTP_FILFNOΓΛCCΓPTCD ΓΛTP_PROΓOCOI EΛTP_LOGINΓΛILΓD EΛTP_RECIPIENΓUNKNO U FΛTP. 1ΛCHINEBUSY
)
S0C EI ΛtpSocket ( ) int Λt pConnect (SOCKET sock clnr *-ιddr) int Λtpbogin (SOCKET sock char 'login rllar "pisswl cliar "recipient) int ΛtpSendFil e (SOCf ET sor k char "fname char *rnanτe) void ΛtpQuit (SOC TT sock) i
)
WSΛDΛTΛ wsaData if (WSΛStartup(MΛKE OPD( 1 1) fc saData)) ( rerr - < "Cannot find usable winsock dll \n" return 1 ) ιnbuf_len - 0 mbuf [0] - 0
SOCKET sock - ΛtpSocke () if (^ock -- IUVΛLID_S0C E1 ) ( cerr " "Cannot open a socket \n return 1 ) int ret - ΛtpConnect ( ock irqvtl]) if (ret) ( cerr << "Cannot establish connection with " --- argv(l) -< \n return 1 ) if (ret - ΛtpLogm (sock "ttonchev" "" "kobata )) ( cerr << "Cannot login onto remote machine (" •-< ret << ") \n" return 1
) argvlij argv(ι))) (
file " -< argv(ι) << "\n" continue case EΛTP_FILEtlOTΛCCEPTED cerr << "Error File " << argv[ιj < " not accepted\n" continue case EΛTP_UNEXPECTΓDEXIT cerr << "Error Connection closed by foreign host \n" return 1 default cerr << "Error Cannot send file " << arg [ I ) << "\n" continue
)
break; ) else cerr << "File ' ^ argv[ιj ^^ " sent \n",
ΛtpOuit (sock) , WSΛCleanυp ( ) , return 0, )
SOCKET ΛtpSocket () ( sockaddr_ιn sin,
SOCKET sock = socket (PF_ iπcr, SOCK^ TREΛM, 0), if (sock == IIJVΛLID_SOCKEI') return sock, F_II1CΓ, r - 0, ckaddr *)ksιn, si7eof (sin))) { ) , OCKEI , r
eturn soc , int AtpConnectr (ςOCKπ sor k char ' ad r ) ( sockaddι_ιn s n, unsigned long lpaddr - i net_addr (addr ) , if (lpaddr == INΛDDR_IIOHE) ( hostent "hinfo = e tlios tbyname (addr ) , if ('hinfo) return -1 lpaddr = * ( ( long * ) hιπ£o--h_addr_l is t [ 0 ) ) , ) sin. sιn_ amily = ΛF_IHET; sm.sιn_addr s__addr = lpaddr, sin sιn_port = htons(608) ; return connect (sock, (sockaddr *)&sιn, sizeof (sin)) ) int ΛtpWaitForLine (SOCKET sock, long timeout = 30) ( timeval tout; tout.tv_sec = timeout, tout tv_usec = 0, fd_set sockset FD_ZERO (ϋsockse ) , FD_ΞET(sock, fsockset) , while ( ' strstr ( inbuf , "\r\π )) ( if (inbuf len == ιnbuf__sιze) return FΛTP_BUrFFPOVERFI.OW, if (' select (sock+ : , fcsockset, HULL, HULL, fctout)) return EΛTP_TIMEOUT, int len = recvlsock, mbuf+ inbuf_len , mbuf_sιze-mbuf_len , 0) if (len == SOCKET_ERROR) continue; if (len == 0) return EΛTP_U1IEXPECTEDEXIT, inbuf_len += len; inbuf ( ιnbuf_len) = 0, ) return EΛTP OERROR, int ΛtpGetReplyCode ( ) ( return (ιnbuf(O) - '0') * 100 + (inbufll) - '0') * 10 + ιnbuf[2) ) int ΛtpGetCodeFamily ( int code) ( return (code / 100); ) long ΛtpGetReplyArgument ( ) ( int code; long arg = -1; sscan (inbuf , "%d (%ld)", &code, &arg) ; return arg; ) void ΛtpClearLme ( ) ( char *lend;
j £ (lend = trst r ( inbuf \ι\n )) ( lend A - ?, char but [100] , strncpylbuf, mbuf, lend-inbuf), buf [lend-inbuf ) = 0, cerr << buf, for (int 1 = 0 l - ιnbuf_len - (lend - inbuf) inbuf [l] - lend( l) , mbuf_len = (lend mbuf) )
) int ΛtpReadCode (SOCKET 5ork int 'rode lonq *arq = HULL) ( int ret - Λtp ai t TorLine ( ςo k ) , if (ret) return ret
•code = ΛtpGetRepJ ytode ( )
*arg = ΛtpGetReplyΛrguinent ( ) ,
ΛtpClearLine ( ) , return EΛTP_NOE ROR ) int AtpSendBuffer (SOCKET sock cliar *buf, lonq len) ( if (len ' 100) r»rr -< buf while (J n > 0) ( int sent = ιenr]( nc buf J eπ 0) if (sent -- ocrrr ΓPROR) lPiurn ΓΛI Γ_UIIFXΓI C 1 EDEy 1 I len -= sent buf += sent, ) return EΛTP_NOERROR ) int ΛtpLogin ( OCKET sock rhai 'login cliar 'passwd char "recipient) ( int ret code, cliar buf [100] , ret - ΛtpReadCode ( sock f«code), if (ret) return ret if (code ι= 220) return FΛ1 F_PROTOCOL, sprintflbuf, "FROM s ^sVrXn loqm passwd) ret = AtpSendBuf (sock buf, strlen (buf )) , if (ret) return ret, r = Λt pReadCode ( sock kcode), if (ret) return ret if (AtpGetCodeFamily (code) ι- ?) return EΛ1 P_LOGINΓΛ!LED sprint lbuf USER %s\r\n" t°cιpi"iιU r=t = ΛtpSendBuf fer (sock buf strlen(buf)) if (ret) return ret ret = ΛtpReadrode ( ock, &code) , if (ret) return ret, if (AtpGetCodeFamily (code) i- J ) return EΛI P_PEC IPIEIirUtlKNOWH return EΛTP_NOERROR, ) int ΛtpSendFile (SOCKET sock, char 'fname, c ar 'rname) ( const stdblksize = 1G384, long fsize, fblksize fblknum, mt ret, code; long delay, arg; char buf [200] ,
FILE *fιn = fopenlfname, rb" ) , if (I fin) return EΛTP__BADFILE,
If (fseek(fm, 0, SEEK_END)) return EΛTP_BΛDFILE, fsize = ftell(fιn), rewind ( fin) ;
// Identify the file
spimtf lbuf ΛME τ,s\r\n iname) ret = ΛtpSendBuf fer (sock buf strlen(buf)) if (ret) return ret, ret = ΛtpReadCode (sock (Vcode) if (ret) return ret, if (AtpGetCodeFamily (code) - 3) leturn EΛrP_FILLJθrΛCCπPl FD sprintflbuf TILF, »ld\r\n fsize) ret = Λt pSenc3Buf fer (sock buf strlen (buf ) ) if (ret) return ret, ret = ΛtpReadCode (sock ι«code) if (ret) return ret if (ΛtpGef(.od°ramιly (code) i- ?) return PΛ1 P_riLEITOIΛ( CFPTED
// Neσotiate block size fblksize - stdblksize for ( int l - O l ' 3 n + ) ( sprintflbuf "BLKSIZC τld\r\n fblksize) ret = ΛfpSendBuf fer (sock buf strlen(buf)) if (ret) return ret, ret = ΛtpReadCod (sock fccode fcarq) if (ret) return ret
//if (code == 722) break if (code == 422 | | code =- 522) fblk i 7e = arg else break if (code i- 22?) return FA rp__PR01 OCOL fblknu = (fsize 1) / fblksize ι \
II Transfer file while (1) (
// Get a block r quest sprintflbuf "PEΛDY\r\n") ret - AtpSendBuf fer (sock buf strlen(buf)) if (ret) return ret, ret - ΛtpReadCode (sock fccode &arg) if (ret) return ret if (code =- 223) break, switch (code) { case 323 break case 423 delay = arq if (delay > 15) r°turn EΛTFJIΛCHltJπBUSj
Sleepidelay * 1000) continue return rΛI P_MΛCH1IJE.DU9 i default return EΛTP_PROTOCOL ) long blk = arg, long size - (blk+1 < fblknum) ~> fblksize (fsize - fblks lze *blk)
// Load block if (data_buf) delete [J data_buf data_buf = new char[sιze], if (fseek(fιn, fblksize'blk, SEEK_SET) ) DFILE, (data_buf , 1 size, fin)
return EΛTP_BΛDFILE,
// Send block sprintflbuf "DATA
size), ret = ΛtpSendBuf fer (sock, buf, strlen (buf )) , if (ret) return ret, ret = ΛtpReadCode (sock, &code fcarg) if (ret) return ret.
switch (code) I case 422 : return EΛTP_PROTOCOL ; case 423 : delay = arg; if (delay > 15) return EΛTP_MΛCHIMEBUSY;
Sleepldelay * 1000) ; continue; case 523 : return EΛTP_MACHINEBUSY; case 125: break; default: return EΛTP_PROTOCOL; ) ret = AtpSendBuf fer (sock, data_buf, size); if (ret) return ret; ret = ΛtpReadC'ncln ( sock , iicocln) ; i f ( ret ) return ret ; ) return EΛTP_HOERROR; ) void ΛtpQuit (SOCKET sock) ( char 'buf = "EXIT\r\n";
ΛtpSendBuf fer (sock, buf, strlen (buf )) ; closesocket ( sock) ; )
Having now described a few embodiments of the invention, and some modifications and variations thereto, it should be apparent to those skilled in the art that the foregoing is merely illustrative and not limiting, having been presented by the way of example only. Numerous modifications and other embodiments are within the scope of one ordinary skill in the art and are contemplated as falling within the scope of the invention as limited only by the appended claims and equivalents thereto.
Claims
1. A system for transmitting video, audio, hypertext and web documents over the internet from a server under the control of an information provider to an end user having a terminal coupled by the associated CPU to the internet, comprising;
means at said server for transmitting said video, audio, hypertext or web document to said end user only when the CPU at said terminal is not busy whereby said transmission is non-realtime .
2. The system of Claim 1 wherein said means at said server for transmitting said video, audio, hypertext or web
documents includes means for detecting internet occupation and for inhibiting said transmission until such time as the network bandwidth can accommodate said transmission regardless of a non-busy CPU at said terminal.
3. The system of Claim 1 wherein said CPU generates a signal indicating that said CPU is not busy and further including means for coupling said signal to said server over said internet to permit said means for transmitting said video, audio, hypertext or web document to said end user when said CPU is not busy.
4. The system of Claim 1 and further including means coupled to said CPU for storing the video, audio, hypertext, or web document sent by said server, and means under the
control of said server and said CPU for generating an onscreen icon at said terminal when said server has successfully transmitted said video, audio, hypertext or web document to said end user and is stored at said CPU.
5. The system of Claim 4 and further including means at said terminal for selecting said icon and for presenting said video, audio, hypertext or web document to said end user responsive thereto.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
AU54558/98A AU5455898A (en) | 1996-11-22 | 1997-11-21 | Smart internet information delivery system |
US09/170,431 US6631405B1 (en) | 1996-11-22 | 1998-10-13 | Smart internet information delivery system which automatically detects and schedules data transmission based on status of client's CPU |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US08/755,029 | 1996-11-22 | ||
US08/755,029 US5845074A (en) | 1996-11-22 | 1996-11-22 | Smart internet information delivery system having a server automatically detects and schedules data transmission based on status of clients CPU |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US08/755,029 Continuation US5845074A (en) | 1996-11-22 | 1996-11-22 | Smart internet information delivery system having a server automatically detects and schedules data transmission based on status of clients CPU |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US09/170,431 Continuation US6631405B1 (en) | 1996-11-22 | 1998-10-13 | Smart internet information delivery system which automatically detects and schedules data transmission based on status of client's CPU |
Publications (1)
Publication Number | Publication Date |
---|---|
WO1998022882A1 true WO1998022882A1 (en) | 1998-05-28 |
Family
ID=25037418
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/US1997/021520 WO1998022882A1 (en) | 1996-11-22 | 1997-11-21 | Smart internet information delivery system |
Country Status (4)
Country | Link |
---|---|
US (3) | US5845074A (en) |
AU (1) | AU5455898A (en) |
TW (1) | TW412687B (en) |
WO (1) | WO1998022882A1 (en) |
Families Citing this family (67)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6026435A (en) | 1996-07-12 | 2000-02-15 | Sanyo Electric Co., Ltd. | Internet information displaying apparatus and internet information displaying method |
US5991306A (en) * | 1996-08-26 | 1999-11-23 | Microsoft Corporation | Pull based, intelligent caching system and method for delivering data over a network |
US6311182B1 (en) * | 1997-11-17 | 2001-10-30 | Genuity Inc. | Voice activated web browser |
US7506020B2 (en) | 1996-11-29 | 2009-03-17 | Frampton E Ellis | Global network computers |
US7926097B2 (en) | 1996-11-29 | 2011-04-12 | Ellis Iii Frampton E | Computer or microchip protected from the internet by internal hardware |
US6725250B1 (en) | 1996-11-29 | 2004-04-20 | Ellis, Iii Frampton E. | Global network computers |
US6732141B2 (en) * | 1996-11-29 | 2004-05-04 | Frampton Erroll Ellis | Commercial distributed processing by personal computers over the internet |
US20050180095A1 (en) | 1996-11-29 | 2005-08-18 | Ellis Frampton E. | Global network computers |
US8312529B2 (en) | 1996-11-29 | 2012-11-13 | Ellis Frampton E | Global network computers |
US8225003B2 (en) | 1996-11-29 | 2012-07-17 | Ellis Iii Frampton E | Computers and microchips with a portion protected by an internal hardware firewall |
US6167428A (en) | 1996-11-29 | 2000-12-26 | Ellis; Frampton E. | Personal computer microprocessor firewalls for internet distributed processing |
US7024449B1 (en) | 1996-11-29 | 2006-04-04 | Ellis Iii Frampton E | Global network computers |
US7035906B1 (en) | 1996-11-29 | 2006-04-25 | Ellis Iii Frampton E | Global network computers |
US7805756B2 (en) | 1996-11-29 | 2010-09-28 | Frampton E Ellis | Microchips with inner firewalls, faraday cages, and/or photovoltaic cells |
US7634529B2 (en) | 1996-11-29 | 2009-12-15 | Ellis Iii Frampton E | Personal and server computers having microchips with multiple processing units and internal firewalls |
US6453352B1 (en) * | 1997-07-14 | 2002-09-17 | Electronic Data Systems Corporation | Integrated electronic commerce system and method |
US6813768B1 (en) * | 1998-02-18 | 2004-11-02 | International Business Machines Corporation | Method and system for automatic task focus swapping during browser wait time |
US6108707A (en) * | 1998-05-08 | 2000-08-22 | Apple Computer, Inc. | Enhanced file transfer operations in a computer system |
US7617124B1 (en) | 1998-12-04 | 2009-11-10 | Digital River, Inc. | Apparatus and method for secure downloading of files |
US7058597B1 (en) | 1998-12-04 | 2006-06-06 | Digital River, Inc. | Apparatus and method for adaptive fraud screening for electronic commerce transactions |
US20030195974A1 (en) | 1998-12-04 | 2003-10-16 | Ronning Joel A. | Apparatus and method for scheduling of search for updates or downloads of a file |
US7171000B1 (en) | 1999-06-10 | 2007-01-30 | Message Secure Corp. | Simplified addressing for private communications |
US6604129B2 (en) | 1999-03-25 | 2003-08-05 | At&T Corp. | Method and apparatus for a conference call mediation service |
US7801737B1 (en) * | 1999-03-30 | 2010-09-21 | Minolta Co., Ltd. | Data distributing system and data recording method |
EP1054543B1 (en) * | 1999-05-21 | 2005-08-03 | Digitiminimi, Inc. | System and method for providing services employing trusted site indicators, and mobile device capable of displaying the trusted site indicators |
US20020019932A1 (en) * | 1999-06-10 | 2002-02-14 | Eng-Whatt Toh | Cryptographically secure network |
US20020101998A1 (en) * | 1999-06-10 | 2002-08-01 | Chee-Hong Wong | Fast escrow delivery |
US6988199B2 (en) | 2000-07-07 | 2006-01-17 | Message Secure | Secure and reliable document delivery |
US6889100B1 (en) | 1999-09-09 | 2005-05-03 | International Business Machines Corporation | Method and system for remote Java audio server in a heterogeneous distributed environment |
AU2001249217A1 (en) * | 2000-03-21 | 2001-10-03 | Lumapath, Inc. | System for providing information to an interested viewer, and method of use thereof |
US6735629B1 (en) * | 2000-05-04 | 2004-05-11 | Networks Associates Technology, Inc. | Method and apparatus for real-time protocol analysis using an active and adaptive auto-throtting CPU allocation front end process |
US7262873B1 (en) | 2000-07-05 | 2007-08-28 | Lexmark International, Inc. | Photoprinter access to remote data |
US7251728B2 (en) | 2000-07-07 | 2007-07-31 | Message Secure Corporation | Secure and reliable document delivery using routing lists |
US20020048372A1 (en) * | 2000-10-19 | 2002-04-25 | Eng-Whatt Toh | Universal signature object for digital data |
US20040158765A1 (en) * | 2000-11-22 | 2004-08-12 | Joachim Charzinski | Device and method for controlling data traffic in a tcp/ip data transmission network |
US20020091783A1 (en) * | 2001-01-10 | 2002-07-11 | Garland Stuart Mandel | Customer definable precedence and preemption for message services |
KR100390645B1 (en) * | 2001-07-27 | 2003-07-07 | 삼성전자주식회사 | Method for reducing current in mobile telecommunication terminal system |
US8359335B2 (en) | 2001-09-29 | 2013-01-22 | Siebel Systems, Inc. | Computing system and method to implicitly commit unsaved data for a world wide web application |
US7146617B2 (en) | 2001-09-29 | 2006-12-05 | Siebel Systems, Inc. | Method, apparatus, and system for implementing view caching in a framework to support web-based applications |
US7461119B2 (en) * | 2001-09-29 | 2008-12-02 | Siebel Systems, Inc. | Method, apparatus, and system for managing status of requests in a client server environment |
US7885996B2 (en) | 2001-09-29 | 2011-02-08 | Siebel Systems, Inc. | Method, apparatus, and system for implementing notifications in a framework to support web-based applications |
US6907451B1 (en) | 2001-09-29 | 2005-06-14 | Siebel Systems, Inc. | Method, apparatus, and system for immediate posting of changes in a client server environment |
US7203948B2 (en) | 2001-09-29 | 2007-04-10 | Siebel Systems, Inc. | Method, apparatus, and system for implementing caching of view custom options in a framework to support web-based applications |
US7870492B2 (en) | 2001-10-02 | 2011-01-11 | Siebel Systems, Inc. | Method, apparatus, and system for managing commands in a client server environment |
US7614065B2 (en) | 2001-12-17 | 2009-11-03 | Automated Media Services, Inc. | System and method for verifying content displayed on an electronic visual display |
US20030229549A1 (en) | 2001-10-17 | 2003-12-11 | Automated Media Services, Inc. | System and method for providing for out-of-home advertising utilizing a satellite network |
US20030135643A1 (en) * | 2002-01-11 | 2003-07-17 | Chaucer Chiu | Data transmission scheduling system and method |
US20030182379A1 (en) * | 2002-03-25 | 2003-09-25 | Henry Steven G. | Maintaining digital transmitter distribution lists |
US7395048B2 (en) * | 2002-12-26 | 2008-07-01 | Motorola, Inc. | Unsolicited wireless content delivery and billing apparatus and method |
US7313527B2 (en) | 2003-01-23 | 2007-12-25 | Intel Corporation | Registering an utterance and an associated destination anchor with a speech recognition engine |
US7349968B2 (en) * | 2003-07-31 | 2008-03-25 | International Business Machines Corporation | Method, system and program product for asynchronously processing requests |
WO2005077066A2 (en) * | 2004-02-09 | 2005-08-25 | American Express Travel Related Services Company, Inc. | System and method to reduce travel-related transaction fraud |
US7903795B2 (en) * | 2004-06-15 | 2011-03-08 | Avaya Inc. | System and method for indicating status of an incoming transmission to a user |
US20050276397A1 (en) * | 2004-06-15 | 2005-12-15 | Cynthia Hiatt | System and method for providing availability information to a user |
US8346910B2 (en) * | 2004-11-30 | 2013-01-01 | American Express Travel Related Services Company, Inc. | Method and apparatus for managing an interactive network session |
KR101191561B1 (en) * | 2006-02-20 | 2012-10-16 | 삼성전자주식회사 | Method of dynamic folder browsing using a bluetooth and the system therefor |
US20080314977A1 (en) * | 2006-06-08 | 2008-12-25 | American Express Travel Related Services Company, Inc. | Method, System, and Computer Program Product for Customer-Level Data Verification |
US9195985B2 (en) * | 2006-06-08 | 2015-11-24 | Iii Holdings 1, Llc | Method, system, and computer program product for customer-level data verification |
US8942182B2 (en) * | 2006-11-21 | 2015-01-27 | Blackberry Limited | Adjustable download rate for a portable electronic device |
US9070114B2 (en) * | 2006-11-21 | 2015-06-30 | Blackberry Limited | Method for receiving email attachment on a portable electronic device |
US8145766B2 (en) | 2007-08-08 | 2012-03-27 | Research In Motion Limited | Method for pre-fetching data chunks of an email attachment on a portable electronic device |
US9747598B2 (en) | 2007-10-02 | 2017-08-29 | Iii Holdings 1, Llc | Dynamic security code push |
US8125796B2 (en) | 2007-11-21 | 2012-02-28 | Frampton E. Ellis | Devices with faraday cages and internal flexibility sipes |
US8219624B2 (en) * | 2008-05-08 | 2012-07-10 | International Business Machines Corporation | System, method, and apparatus for electronic communication initiation contingent on busyness |
US9674636B2 (en) * | 2009-09-03 | 2017-06-06 | Interactive Wireless Technologies Llc | System, method and computer software product for providing interactive data using a mobile device |
US8429735B2 (en) | 2010-01-26 | 2013-04-23 | Frampton E. Ellis | Method of using one or more secure private networks to actively configure the hardware of a computer or microchip |
US8719167B2 (en) | 2012-03-02 | 2014-05-06 | American Express Travel Related Services Company, Inc. | Systems and methods for enhanced authorization fraud mitigation |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4126895A (en) * | 1975-12-29 | 1978-11-21 | International Standard Electric Corporation | Data processing system with monitoring and regulation of processor free time |
US4630196A (en) * | 1983-04-13 | 1986-12-16 | At&T Information Systems, Inc. | Store and forward facility for use in multiprocessing environment |
US5020020A (en) * | 1989-04-07 | 1991-05-28 | Digital Equipment Corporation | Computer interconnect system with transmit-abort function |
US5491820A (en) * | 1994-11-10 | 1996-02-13 | At&T Corporation | Distributed, intermittently connected, object-oriented database and management system |
US5557724A (en) * | 1993-10-12 | 1996-09-17 | Intel Corporation | User interface, method, and apparatus selecting and playing channels having video, audio, and/or text streams |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US3623007A (en) * | 1967-06-14 | 1971-11-23 | Bell Telephone Labor Inc | Feedback control monitor for stored program data processing system |
US5125096A (en) * | 1988-10-31 | 1992-06-23 | International Business Machines Corporation | System for implementing to a packet switch protocol for a multinode data communications network utilizing separate data and control paths |
CA1317678C (en) * | 1989-03-20 | 1993-05-11 | William Jaaskelainen | Dynamic progress marking icon |
DE3921943A1 (en) * | 1989-07-04 | 1991-01-17 | Grundig Emv | OFFICE COMMUNICATION SYSTEM FOR TRANSMITTING MESSAGE AND / OR IMAGE INFORMATION ABOUT A MESSAGE NETWORK FOR SWITCHED CONNECTIONS |
EP0431232A1 (en) * | 1989-12-06 | 1991-06-12 | International Business Machines Corporation | Mechanism for measuring the service times of software and hardware components in complex systems |
US5684918A (en) * | 1992-02-07 | 1997-11-04 | Abecassis; Max | System for integrating video and communications |
US5913040A (en) | 1995-08-22 | 1999-06-15 | Backweb Ltd. | Method and apparatus for transmitting and displaying information between a remote network and a local computer |
US5778395A (en) * | 1995-10-23 | 1998-07-07 | Stac, Inc. | System for backing up files from disk volumes on multiple nodes of a computer network |
US5748901A (en) * | 1996-05-21 | 1998-05-05 | Ramot University Authority Ltd. | Flow control algorithm for high speed networks |
-
1996
- 1996-11-22 US US08/755,029 patent/US5845074A/en not_active Expired - Lifetime
-
1997
- 1997-11-19 TW TW086117313A patent/TW412687B/en not_active IP Right Cessation
- 1997-11-21 WO PCT/US1997/021520 patent/WO1998022882A1/en active Application Filing
- 1997-11-21 AU AU54558/98A patent/AU5455898A/en not_active Abandoned
-
1998
- 1998-10-13 US US09/170,431 patent/US6631405B1/en not_active Expired - Lifetime
-
2003
- 2003-01-28 US US10/352,243 patent/US20040059799A1/en not_active Abandoned
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4126895A (en) * | 1975-12-29 | 1978-11-21 | International Standard Electric Corporation | Data processing system with monitoring and regulation of processor free time |
US4630196A (en) * | 1983-04-13 | 1986-12-16 | At&T Information Systems, Inc. | Store and forward facility for use in multiprocessing environment |
US5020020A (en) * | 1989-04-07 | 1991-05-28 | Digital Equipment Corporation | Computer interconnect system with transmit-abort function |
US5557724A (en) * | 1993-10-12 | 1996-09-17 | Intel Corporation | User interface, method, and apparatus selecting and playing channels having video, audio, and/or text streams |
US5491820A (en) * | 1994-11-10 | 1996-02-13 | At&T Corporation | Distributed, intermittently connected, object-oriented database and management system |
Also Published As
Publication number | Publication date |
---|---|
US6631405B1 (en) | 2003-10-07 |
AU5455898A (en) | 1998-06-10 |
TW412687B (en) | 2000-11-21 |
US20040059799A1 (en) | 2004-03-25 |
US5845074A (en) | 1998-12-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO1998022882A1 (en) | Smart internet information delivery system | |
US9191372B2 (en) | Tracking electronic content | |
JP5173841B2 (en) | Communication and document management system and method | |
US20030122922A1 (en) | Video e-mail system and associated method | |
US20090063648A1 (en) | Viewing Attachments to Electronic Communications Via Pushing the Attachment to a Networked Viewing Site | |
US20130013676A1 (en) | Method and system for continuous interactive communication in an electronic network | |
US20010049721A1 (en) | Method and system for continuous interactive communication in an electronic network | |
US20090037515A1 (en) | System and method for automatic transfer of data from one device to another | |
US20010037296A1 (en) | Electronic Billing with required viewing of supplemental information | |
US20080109335A1 (en) | Delivering electronic messages from a user's electronic message service provider to a system for facilitating financial transactions | |
FR2711026A1 (en) | System for managing the consumption of data consultations over a telecommunications network. | |
JP2000517440A (en) | Apparatus and method for detection and removal of email viruses | |
JPH10228432A (en) | Method and device for providing wide decoding function of contents attached to electronic mail | |
US20030105712A1 (en) | Messaging system and method | |
EP1229452B1 (en) | Information distribution system, information distribution method, and computer-readable medium storing distribution program | |
EP1001578A2 (en) | System and method for accessing web pages using e-mail | |
US20020091774A1 (en) | Method and system for retrieving electronic mail for a plurality of users over a single device | |
US6938033B1 (en) | System and method of using e-mail centered internet interaction | |
EP1139637A2 (en) | Method and system to have privileges granted by an access manager in a communications network | |
RU2419137C2 (en) | System and method to hand over documents and to control circulation of documents | |
JP2004302569A (en) | Electronic mail management system | |
KR20010081731A (en) | Apparatus for and method of reading e-mail from web-based e-mail service server using e-mail program | |
EP1358749B1 (en) | Method for adding sound via a telephone network to a page of data that can be remotely consulted via a communication network, site, voice server and computer using said method | |
EP2048853A1 (en) | System and user terminal for storing, managing and displaying image, audio or video files | |
JP4084210B2 (en) | E-mail system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AK | Designated states |
Kind code of ref document: A1 Designated state(s): AU CA CN IL JP KR NO NZ SG |
|
AL | Designated countries for regional patents |
Kind code of ref document: A1 Designated state(s): AT BE CH DE DK ES FI FR GB GR IE IT LU MC NL PT SE |
|
DFPE | Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101) | ||
121 | Ep: the epo has been informed by wipo that ep was designated in this application | ||
122 | Ep: pct application non-entry in european phase | ||
NENP | Non-entry into the national phase |
Ref country code: CA |